I took the liberty of changing the subject of your e-mail because this
way everyone can follow it better.
Well, you can execute the ping command directly from within PHP and then
parse its input. For example:
<?php
preg_match ("/([0-1]) received/", shell_exec ("ping -c 1 -w 2
www.phparch.com 2>/dev/null"), $a);
if (count ($a) && $a[1])
echo "success";
else
echo "failure";
?>
This will work only under Unix, but you can very easily adapt it to
whatever os you need, as long as it supports pinging from the command
line.
Marco
------------
php|architect - The magazine for PHP Professionals
The monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com
On Sat, 2002-11-23 at 16:08, Paul Marinas wrote:
>
> dose anyone how to send a "ping" in local network
>
> thanks
>
> Paul Marinas
> Technical Support
> RDS Craiova
>
>
> Phone: +402-51-410-194
> Mobile: +407-22-451-439
> Fax: +402-51-416-579
> www.rdsnet.ro
> .....................................................
>
> Privileged/Confidential Information may be contained in this message. If you
> are not the addressee indicated in this
> message (or responsible for delivery of the message to such person), you may
> not copy or deliver this message to
> anyone. In such a case, you should destroy this message and kindly notify
> the sender by reply e-mail.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php