Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP Ping Map

Status
Not open for further replies.

Brianfree

Programmer
Feb 6, 2008
220
GB
Hi, im am trying to write a simple php page which I can overlay results as layers over a drawing and refresh every 60 seconds.

What I need to program to do is ping a list of ip addresses if there is a response then show a green icon or text else show a red icon or text.

I would need to list ip addresses and names in an array so it is easy to maintain devices?

Was also thinking, if there is no response a counter could be displayed for attempts until back on line?

Please can anyone point me in the correct direction?

Many thanks

Brian
 
You can set the page up to autorefesh every x number of second using a meta tag or JS,or even use Ajax to run the ping on the server this of course would fall outside the scope of this forum.


Once you get your PHP to run, you would need to parse the ping results to identify whether its active or not.

Look at the system() function.

You can issue a standard terminal ping command and get its output back.







----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top