rendered paste bodyecho lookup("PortNumber","The Name of the Service","your.host.com");
*/
function lookup($hport,$Something,$who){
$fp = fsockopen($who, $hport, &$errno, &$errstr, 4);
if (!$fp){
$data = "<tr valign=top><td width=\"140\"><div style=\"font-family: tahoma; font-weight: bold; font-size:9px;color:darkgrey;\">$Something :</div></td><td width=\"100\"><div style=\"font-family: tahoma; font-size: 10px;color: magenta;font-weight: bold\">Down :(</div><div style=\"font-family: tahoma;font-size: 10px;color: black;font-weight; normal\">($who)</div></td></tr>";
} else {
$data = "<tr valign=top><td width=\"140\"><div style=\"font-family: tahoma;font-size: 9px; font-weight:bold;color:darkgrey;\">$Something :</div></td></font><td width=\"100\"><div style=\"font-family: tahoma;color: limegreen;font-size: 10px;font-weight: bold\">Running :)</div><div style=\"font-family: tahoma;font-size: 10px;color: black;font-weight: normal\">($who)</div></td></tr>";
fclose($fp);
}
return $data;
}
?>
<div style="align:center;font-family:century gothic, tahoma, verdana, sans-serif; color: black; font-size:20px;font-weight: bold;text-slign:center">Systems Status:</div>
<?php
echo "<table style=\"border:gray 1px solid\" cellpadding=\"0\" width=\"240\">";
echo lookup("80","Main Web Server","www.adultdvdnow.com");
echo lookup("80","Backup Web Server","www1.adultdvdnow.com");
etc....