While working on a shared hosting server, I found that the company I'm working with has disabled my access to the Unix/Linux ping command. Not to be deterred, I found several different ways to run a ping command with a PHP script.
Use the Net_Ping module
The first thing you can try to do is use the PHP PEAR Net_Ping module to get around this problem. In short, you install it like this:
pear install Net_Ping
Then use it like this: