is this possible ???? ( php )

Hi guys, i am trying to add a functionality to my site that checks the status of a given server to see if its responding to http call ( port 80 )

Can this be done in php what i basically want to do is


1) check if given Ip is responding to http ( i.e if the server is up )

2) if yes then assign a variable say $image = gree_light.gif

if the server does not respond the $image - red_light.gif


I can then add this to my status page so that when it loads it checks the servers across my network and then the rest of the page will use the $image variable


Any ideas ? it would be great if i could do this in ASP but php is good too, its this part of the code that i am stuck with ( HOW to check or call an external servers httpd status )

Thanks guys/gals

 

 

 

 

Top