Skip to content

Instantly share code, notes, and snippets.

@artur9010
Last active January 24, 2021 09:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save artur9010/a6f5b42e502ef60e87e7f34fd7d19195 to your computer and use it in GitHub Desktop.
Minecraft Server List PHP Minecraft-List.org
<?php
/*
Advertise your Minecraft server for free
https://minecraft-list.org
*/
$data = file_get_contents("https://minecraft-list.org/server/4131-kiwimc.pl/json");
$server = json_decode($data);
if($server->online){
echo "Address: {$server->address}<br/>";
echo "Players online: {$server->players->online}<br/>";
echo "Version: {$server->version->name}";
}else{
echo "Server is offline.";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment