Page 1 of 1

Obtaining various information from other servers

Posted: Wed Mar 01, 2006 8:06 am
by TheOracle
Hi All,

I want to write a script which basically 'polls' a specified IP address for certain info. I need to monitor the 'server uptime', 'webserver status', and or any other ports i.e. for game servers.

Can this be done in PHP?

Hope you can help.

Posted: Wed Mar 01, 2006 8:20 am
by shiznatix
you can use the exec() command. you can also try a fopen() or a file_get_contents() on a webserver. i don't know how to check a different port with anything but exec()

Posted: Wed Mar 01, 2006 9:20 am
by feyd
depending on the protocol supported, fsockopen() or curl may also be of use.