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
CURRENT (BROKEN - It cannot possibly return a number of players from the API method that returns only true or false based on whether the server is up. The status method doesn't even return data.players) | |
var ip = "player.server.com"; | |
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", "http://minecraft-api.com/v1/status/?server=" + ip, true); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState == 4) { | |
data = JSON.parse(xhr.responseText); | |
if (data.status) { |
NewerOlder