Exclude pings from apache error logs (ran from PHP exec)
- by fooraide
Now, for a number of reasons I need to ping several hosts on a regular basis for a dashboard display.
I use this PHP function to do it:
function PingHost($strIpAddr) {
exec(escapeshellcmd('ping -q -W 1 -c 1 '.$strIpAddr), $dataresult, $returnvar);
if (substr($dataresult[4],0,3) == "rtt") {
//We got a ping result,…