Server status
- Started
- Last post
- 6 Responses
- blend3
Is there any way to check with javascript whether a http server is up and running? I would like to direct people to alternative URL if my server goes down. It is not a dynamic ip so I don't see why I should need server side scripting for this.
thanks.
- Mick0
If a site goes down it's not going to load the javascript on the site right ;) My guess is you would need your index page on another server to test if YOUR server is up.
- blend30
ummm,
yes. That's what I'm trying to do. I have a list URLs and I want to show users only the ones that are online. Sorry if I wasn't clear enough. I don't want to do this serverside, because I'm a cheap ass. Anybody done something like this?
- unknown0
in coldfusion there is a fileExists function that you could call...
- dsmith70
ii don;t know of a way with just javascript but I imagine you could work off of cookies somehow but that would probably be pushing the limits. I would look to doing some type of variable/action backend solution with PHP or CF.
- blend30
ok,
thanks guys. I already ran into something interesting, but celebrated too soon :(http://www.faqts.com/knowledge_b…
"code can't check whether the server exists or is running"
sniff... oh well, maybe it wasn't meant to be. I just have to grab my ankles and pay for hosting :(
- sparker0
You can find that out with code. Why not just download webmin (or other online server manager) and reverse engineer the code to check the status of other servers?
This is basically what web based NAT and DNS tools do...you could just write some VB...or PERL/Python to ping the specified IP or Domain and to see if it gets a packet response...if it does, then direct them to that server, if it doesn't then redirect them to the alternate.
You could do the same checking for headers from the server...