Simple yes, only problem is when I use it the whole page disappears. I am currently using the following problem is it doesn't work either. ???
I tried replacing every thing from <?php to ?> with your code and as I stated the page will not show. I am using frames on my web site.
<?php
function lookup_ports($hport,$hdomain) {
$fp = fsockopen($hdomain, $hport,$errno,$errstr, 4);
if (!$fp){
//$data = "<font color=red size=4>*</font>";
$data = "<img src=image/icons/off.gif>"; // Urgency!
} else {
//$data = "<font color=green size=4>*</font>";
$data = "<img src=image/icons/on.gif>"; // Everything is fine
fclose($fp);
}
return $data;
}
echo "Checking services";
echo "<table border=0 cellpadding=0 cellspacing=0>";
echo "<tr><td width=35 valign=center align=left>";
echo "<ul><li><b>Login Server</b>";
echo "</td><td width=124 align=center> <b>".lookup_ports("2106","66.138.53.33")."</b></i></li>";
echo "</td></tr>";
?>