/*
* File call Index.php
*/
<?php
function checkPort($host,$port)
{
$online = @fsockopen($host, $port, $errno, $errstr, 1);
if ($online)
return "<font color='Green'>Online";
else
return "<font color='red'>Offline";
}
' This calls the function and display it
echo checkPort(ServerIP, PortToCheck);
can that be used in Index.htm
I have a better script which also adds protection looking at the example it could be flooded by people pressing F5 or refreshing all the time. Mine also has a time so it won't take ages loading up if you want it i'll post here.
