View Full Version : Site Down Script
mvwebdesign
04-15-2008, 04: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, 06:16 AM
See this thread (http://dynamicdrive.com/forums/showthread.php?t=31495) ;)
mvwebdesign
04-22-2008, 03: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, 04: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 ;)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.