Skip to content

Instantly share code, notes, and snippets.

@artur9010

artur9010/status.php

Last active Jan 24, 2021
Embed
What would you like to do?
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