This is a simple Up/Down network monitor to show what your server is able to see on the network and internet.
shell_exec()
shellExecPingArray.php
<html>
<head>
<meta http-equiv="refresh" content="5">
</head>
<body>
<?php
$websites = array("10.0.1.1","google.com","salesforce.com","facebook.com");
echo "<h1>Site Status ".date("h:i:s")."</h1>";
foreach ($websites as $url){
$command = "ping -c 1 ".$url;
echo "<strong>Address: ".$url."</strong>";
echo "<pre>";
echo shell_exec($command);
echo "</pre>";
}
?>
</body>
</html>
Be the first to comment