Ping a remote device to show whether it is on or offline
Posted 24 July 2006 - 11:38 AM
I am trying to develop an application that will ping a IP address or computer name from the database to return an online or offline image on the webpage depending on the ping results. ie if the ping returns the packet the page displays online, and if it doenst it displays offline.
If anyone has any idea on how to do this then I would be extremely grateful.
Posted 24 July 2006 - 12:02 PM
<?php exec("ping 192.168.1.1",$out); echo "<pre>"; print_r($out); echo "</pre>"; ?>
Posted 24 July 2006 - 12:19 PM
and it went all wrong and gave me this:
Warning: exec(): Unable to fork [ping 127.0.0.1] in C:\Inetpub\apps site\pinger\ping3.php on line 2
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users