"; # Process all services montiored. foreach( $configs['services'] as $serviceName => $servicePort ) { # Determine Port Status. $status = @fsockopen($configs['server_ip'], $servicePort, $errno, $errstr, 5); # What is the result. if( !$status ) { $statusText = "Down"; } else { $statusText = "Up"; } # Set the status Row. $serverStatus .= ""; } # Finish service status table. $serverStatus .= "
ServiceStatus
{$serviceName}{$statusText}
"; # File Complete. ?>