Skip to content

Instantly share code, notes, and snippets.

@ikr7
Created April 8, 2014 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikr7/10118717 to your computer and use it in GitHub Desktop.
Save ikr7/10118717 to your computer and use it in GitHub Desktop.
Foooooooooooooo
<?php
$data = json_decode(file_get_contents("https://pvp.minecraft.jp/servers.json"));
$all_players = 0;
foreach($data->servers as $server){
$all_players += $server->Server->current;
printf("%s: %d/%d, %s\n",
$server->Server->name,
$server->Server->current,
$server->Server->max,
$server->Server->currentMap
);
}
print($all_players."\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment