serverts_status.php
Codice PHP:
<?PHP
$ts_ip = "gisclan.no-ip.org"; // Change to your server's IP external or domain name
$ts_port = "51234"; // Make sure this port is open on the router or firewall
$output = fsockopen("$ts_ip", $ts_port, $errno, $errstr, 2);
socket_set_timeout($output, 000002);
Header("Content-Type: text/javascript");
if (!$output) {
print "document.write('OFFLINE');";
} else {
print "document.write('ONLINE');";
}
@fclose($output);
?>
codice da mettere dove vuoi che venga stampata la risposta
Codice:
<script src="www.dominio.it/serverts_status.php" language="Javascript" type="text/javascript"></script>
ho provato in locale e funziona... mi risponde ONLINE