Site is down redirection

<?php
$host = ‘www.yoursitehere.com’;
$up = ping($host);
//site is up
if( $up )
{
header(‘Location: http://’.$host);
}

//site is down
else
{
header(‘Location: http://www.yourothersite.com’);
}
?>

LEAVE A REPLY

Please enter your comment!
Please enter your name here

*