Server Online/Offline script for multiple IP's
<p>I was just looking for php script to check server Online Or OFfline for my website.. On one forum I found the following script:</p>

<pre><code>&lt;?php
    /* our simple php ping function */
    function ping($host)
    {
            exec(sprintf('ping -c 1 -W 5 %s', escapeshellarg($host)), $res, $rval);
            return $rval === 0;
    }

    /* check if the host is up
            $host can also be an ip address */
    $host = 'XX.XX.XX.XX';
    $up = ping($host);

    /* optionally display either a red or green image to signify the server status */
    if ($up) {
    echo 'Online';
} else {
    echo 'Offline';
}
    ?&gt;
</code></pre>

<p>I Just wanna know how to ping multiple IP's in same script? also how to add online since counter... ?  Thanks in advance..</p>