The server status page tells you what services are currently up and running and what services are down and not useable.
echo " ";
$servers = array(
"WEB SERVER|localhost|80" ,
"FTP SERVER|localhost|21" ,
"MYSQL DATABASE|localhost|3306" ,
"POP3 MAIL SERVER|localhost|110" ,
"COD4 SERVER|udp://192.168.0.2|28960" ,
"SHOUTCAST AUDIO SERVER|localhost|8000" ,
"SMTP MAIL SERVER|localhost|25" ,
"TEAMSPEAK VOICE SERVER|localhost|14534" ,
"WEBCAM SERVER1|localhost|8080" ,
"WEBCAM SERVER2|192.168.0.6|8081"
);
$working = 0;
$notworking = 0;
foreach($servers as $server){
$server = explode("|",$server);
$name = $server[0];
$host = $server[1];
$port = $server[2];
if(@$fp = fsockopen($host,$port,$errno,$errstr,1)){
echo '| '.$name.' | PINGING.. RESULT! | ';
$working ++;
fclose($fp);
}else{
echo '| '.$name.' | PINGING.. FAILED! | ';
$notworking++;
}
}
$endmsg = "There are $working servers showing as up and running and $notworking
servers showing as down.";
echo " $endmsg ";
?> |