Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <!-- Lien de la vidéo traitant de ce code: https://www.youtube.com/watch?v=XpcTDGIsUgc-->
- <!--N'hésite pas à t'abonner! https://www.youtube.com/c/Wistaro -->
- <html>
- <head>
- <meta charset="utf-8">
- <title>Minecraft Info seveur</title>
- </head>
- <body>
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- Joueurs en ligne : <span id="ponline"></span>/<span id="max"></span><br />
- Statut Serveur : <span class="enligne" id="online"></span><br />
- Ce serveur fonctionne sous : <span class="type" id="type"></span>
- <script type="text/javascript">
- var ip = "VOTRE_IP";
- var port = "PORT_DU_SERVEUR";
- var statut = "";
- var PlayersMax;
- var PlayerNow;
- var TypeOfServer;
- $.getJSON('http://api.syfaro.net/minecraft/1.3/server/status?ip='+ip+'&port='+port, function(data) {
- if(data.status=="success"){
- statut = " en ligne ";
- } else {
- statut = "fermé";
- }
- PlayersMax = data.players.max;
- PlayersNow = data.players.now;
- TypeOfServer = data.server.name;
- document.getElementById('online').textContent = statut;
- document.getElementById('max').textContent = PlayersMax;
- document.getElementById('ponline').textContent = PlayersNow;
- document.getElementById('type').textContent = TypeOfServer;
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement