Hey guys, so I've been working on some code to test if a server (Minecraft) is online or not. Code:
<?php
$ip = 'zurfaria.fmc.pw';
$port = 25565;
$checkSock = @fsockopen($ip, $port, $empty, $empty, 1);
if($checkSock !== FALSE)
{
echo 'Online';
}else{
echo 'Offline';
}
?>
I...