Re: PING
| From: | Joseph H Blythe | Date: | Wed, 06 Sep 2000 22:54:09 +0000 |
| Subject: | Re: PING | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15617@lists.php.net to get a copy of this message | ||
Brian Silvers wrote:
> I was wondering if there is an equivalent set of
> functions like the Net Module in Perl? I looked over
> the PHP connectivity functions but I don't that is
> specifically what I am looking for. For example how
> would I do something like the Net::ping in Perl
>
> $p->ping(host,timeout)
>
I asked the same sort of question a while ago, it is rather obvious if you
RTFM, like I failed to do :-)
Here is a solution David Robley kindly gave me:
$command = "/path/to/ping -c 3 -q $host";
$result = system($command, $retval);
btw: you may want to use exec() depending on your needs.
Regards
Jsoeph