"0") { $serverStatus = "
"; } # Process all services1 montiored. foreach( $configs['services1'] 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 .= ""; } # Process all services1 montiored. foreach( $configs['services2'] as $serviceName => $servicePort ) { # Determine Port Status. $status = @fsockopen($configs['server_ip2'], $servicePort, $errno, $errstr, 5); # What is the result. if( !$status ) { $statusText = "Down"; } else { $statusText = "Up"; } # Set the status Row. $serverStatus .= ""; } # Process all services1 montiored. foreach( $configs['services3'] as $serviceName => $servicePort ) { # Determine Port Status. $status = @fsockopen($configs['server_ip3'], $servicePort, $errno, $errstr, 5); # What is the result. if( !$status ) { $statusText = "Down"; } else { $statusText = "Up"; } # Set the status Row. $serverStatus .= ""; } # Process all services1 montiored. foreach( $configs['services4'] as $serviceName => $servicePort ) { # Determine Port Status. $status = @fsockopen($configs['server_ip4'], $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 .= "
ServerStatus
{$serviceName}{$statusText}
{$serviceName}{$statusText}
{$serviceName}{$statusText}
{$serviceName}{$statusText}
"; # File Complete. ?>