Server | Status |
";
# 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 .= "{$serviceName} | {$statusText} | ";
}
# 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 .= "{$serviceName} | {$statusText} | ";
}
# 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 .= "{$serviceName} | {$statusText} | ";
}
# 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 .= "{$serviceName} | {$statusText} | ";
}
# Finish service status table.
$serverStatus .= "";
# File Complete.
?>