11-18-2009, 06:15 PM
hello guys
i found a script to check if a server is online or offline
but i have to open a link to check it
i wish it could be integrated in a index.html directly
how can i do that?
this is the code
i found a script to check if a server is online or offline
but i have to open a link to check it
i wish it could be integrated in a index.html directly
how can i do that?
this is the code
Code:
<?
$ip = "beatdj.servegame.com";
$port = "18000";
if (! $sock = @fsockopen($ip, $port, $num, $error, 5))
echo '<B><FONT COLOR=red>Offline</b></FONT>';
else{
echo '<B><FONT COLOR=lime>Online</b></FONT>';
fclose($sock);
}
?>