Posted by CyberDog on 12/16/55 11:30
Per Jørgen Vigdal wrote:
> If the server that host the URL_A that I am trying to redirecting to is
> down, I want to redirect to an other server that host URL_B
Hm... how about something like this:
---snip---
$web = "http://www.myoriginalsite.com";
$backup = "http://www.mybackupsite.com";
$var = @fsockopen($web, 80, $errno, $errstr, 2);
if ($var) { header("Location: ". $web) } else { header("Location: ".
$backup) }
---snip---
[Back to original message]
|