<script language='javascript'>

window.setTimeout('window.location.reload()',15000);

</script>

 

<font size=5; color=red>GOGO</font>

<font size=5; color=blue> Server Ping Test</font>
<br>


<?php
$now=date("Y-m-d-H:i:s");
$host=array(
        '192.168.0.101' => 'Main DB',
        '192.168.0.102' => 'IMAGE',
        '192.168.0.103' => 'Homepage',
 );

foreach($host as $ip => $hostname) {

$output = shell_exec("ping -c2 -w2 $ip");
if(strpos($output, '0 received')){
  echo "$ip ping <font size=5; color=red>Failed</font> - $hostname <br />";
}else{
  echo "$ip ping <font size=5>Succeeded</font> - $hostname <br />";
 }
}

echo("<br><font size=3> Update time : $now </font> <br />");
?>

Posted by bruce lee