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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking for active PHP server 1

Status
Not open for further replies.

jimoblak

Instructor
Oct 23, 2001
3,620
US
I am working with a company intranet that does not support PHP. To enable PHP functionality on a few pages, I redirect users from the intranet server to my own computer that runs PHP.

Is there some way for a plain HTML page to determine if another server (aka: my desktop computer running PHP/Apache) is active?

This is most likely done through javascript. If my computer is running, the intranet web page should direct the user to my computer's PHP/Apache server. If my computer is not running, the intranet web page should tell the user that my computer is unavailable - in a format other than the standard 'Cannot connect to site' page that browsers display.
 
I was given a tip I wasn't able to use for this idea not so long ago... I don't have the thread saved anywhere so I can't link you... but here's the basic idea.

Put a page on your computer with a javascript function in it that returns true when run.

Then have the other server open that page as a popup (a named popup)... and try to run that function.

There's a way in javascript to see if the function ran or not... or maybe you just work off that true/false return.

Anyway, if it ran than the server is obviouslly alive, if it didn't then it's not.

-Rob
(I'll dig up that other thread, this explanation sounds thin to me)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top