Created
January 27, 2015 00:50
-
-
Save LukeXF/7242c5e38c716b7b8169 to your computer and use it in GitHub Desktop.
Ping server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function ServerStatus(serverip){ | |
$.getJSON('http://mcapi.ca/query/' + serverip + '/players', function(json){ | |
if (json.status !== true) { | |
$('#players').html("0"); | |
} else { | |
$("#players").html(json.players.online); | |
} | |
}); | |
} | |
ServerStatus('play.purepvp.org'); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment