View Full Version : Site Down Script
mvwebdesign
04-15-2008, 05:54 AM
Hi,
I was wondering if there was a script that would make my website redirect to another website if site #1 was down.
Thanks
rangana
04-15-2008, 07:16 AM
See this thread (http://dynamicdrive.com/forums/showthread.php?t=31495) ;)
mvwebdesign
04-22-2008, 04:57 AM
That thread refers to an Iframe hosted on his computer and another page hosted on the web. What about a page just hosted on the web?
Thanks
rangana
04-22-2008, 05:38 AM
I believe the thetestingsite's code should keep you going :)
<?php
error_reporting(0);
if (fsockopen("www.yoursite.com", 80, $errno, $errstr, 30)) {
header('Location: http://www.yoursite.com/computer.html');
}
else {
header('Location: http://www.other-site.com/page.html');
}
?>
...if nothing works, do post this in the PHP section...i'm not on my wits with regards to PHP ;)
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.