PHP class, web page Minecraft server.
mcstat supports Server List Ping as seen in 1.7
and later, and 1.5.2
. Server List Ping 1.5.2
works for older Minecraft servers (all the way back to 1.4.2
), while the 1.7
Server List Ping should be used for newer setups. mcstat also supports the UDP full and basic Query protocols.
stat.php
is a simple web page that lets users query a given server.
Note: stat.php
shouldn't be used on a public server as it's not
well tested!
php > require_once './mcstat.php';
php > $m = new MinecraftStatus('Uberminecraft.com');
php > var_dump($m->ping());
array(6) {
["player_count"]=>
string(4) "2026"
["player_max"]=>
string(4) "5000"
["motd"]=>
string(62) "§aUberminecraft §aCloud §6| §c22 Games§b
§l1.7 Play Now!"
["server_version"]=>
string(5) "1.7.4"
["protocol_version"]=>
string(1) "8"
["latency"]=>
float(150)
}