It allows you to show you helpful message to site visitors during the down time of your website.
<?php
$host = 'www.volk37.com';
$up = ping($host);
// if website is up, show the message on site.
if( $up ) {
header('Location: http://'.$host);
}
// If the site is down
else {
header('Location: http://www.someothersite.com/helful_message');
}
?>
One problem with this, is it would take longer to execute (talking very little here), you are using variables when they are not needed.
This would take less time to execute :
<?php
// if website is up, show the message on site.
if( ping(www.volk37.com) ) {
header('Location: http://www.volk37.com');
}
// If the site is down
else {
header('Location: http://www.someothersite.com/helful_message');
}
?>
His concept is that both sites, Main and Sub are not in the same server, neither this script is. So he will assign AN A Record to his dns on the server that holds this script, he will make a different A Record for the main site, on the other server, and another a record on another server with the sub site. So when his dns goes off this won't work either. Dunno it was just a guess