a website PHP Host Failover Script

April 26, 2010 – 9:51 pm

I want my clients’ sites to be up all the time, but I don’t want to mess around with changing DNS constantly, its too much out of my control.  It can take 24 hours to propagate, and the problem affecting a website is often resolved before DNS propagation could be reversed.

In short, I don’t want DNS to change unless it has to.

I have written a PHP script that could be placed on a “free webhost”, such as the free credit webhost with a godaddy domain name, that will test a website through a cURL function and when successful then proceed to forward the visitor to that site, or otherwise forward the visitor to second, third or more hosts, depending on which one responds.. simply going down the list until one is active. You could even have the page reload until a successful connection is made.

Obviously, this will do nothing for when godaddy goes down, but it will allow me more control over what happens when my own servers go down.

This first version will check each time to make sure the host is active before forwarding the visitor to the verified host.

If anyone is interested, you may download it from my website. Its available for free, I only ask you to comment here on your suggestions for improvement.

I’d always be interested in hearing suggestions for features or improvement!

http://www.graphinex.com/files/websitePHPhostfailover.zip

Version 2 will be available soon but will have a one time cost of $10 via paypal to access the down-loadable copy. Show your appreciation for this program with a one time donation to fund the cost of further development by ording version 2 (not yet released).

Future features for version 2:

Optional Domain Masking – Load a site in a frame, instead of refreshing the location bar of the browser with the URL

Content Visibility Verification – A server application failure can interrupt your site being displayed properly. How often does some vital service of the website fail, such as MySQL, interruptiong service, but not taking down all services?

You must be logged in to post a comment.

Be notified of
page updates
it's private
powered by
ChangeDetection
customer service software technical support
Live Chat by Comm100