Servus,
Voila,
---------------------------------------------------------------------------------
<?php
function serveronline($
ip,$port){
$output = @fsockopen($
ip, $port, $errno, $errstr, 2);
socket_set_timeout($output, 000002);
if (!$output) {
return false;
} else {
return true;
}
@fclose($output);
}
$css_ip = "12.16.224.122"; // Change to your server's
IP external or domain name
$css_port = "28200"; // Make sure this port is open on the router or firewall
$css_on = @serveronline($css_ip,$css_port);
if (!$css_on) {
echo " <a id=\"offline\">offline</a>";
} else {
echo "<a id=\"online\">online</a>";
}
?>