Page 1 of 1

how to know server started or not using PHP

Posted: Thu Nov 02, 2006 7:18 am
by madhu
Dear All,

Can any one know "how to know the server started or not using php programatically"

Please suggest me how to implement...

Waiting for your valuable replies....

Thanks and regards
MADHU


feyd | capslock was apparently stuck when madhu typed the title.

Re: HOW TO KNOW SERVER STARTED OR NOT USING PHP

Posted: Thu Nov 02, 2006 7:25 am
by Chris Corbyn
madhu wrote:Dear All,

Can any one know "how to know the server started or not using php programatically"

Please suggest me how to implement...

Waiting for your valuable replies....

Thanks and regards
MADHU
What do you mean? The same server? PHP won't run is if the server hasn't started correctly. If you're checking a remote machine just use something like fsockopen() to try to establish connections to the relevant services.

Posted: Thu Nov 02, 2006 7:26 am
by feyd
A mythical server, or something a little more concrete?

This sort of thing will often be done through system() and it's siblings. What you need to run depends entirely on the server you're starting.