state = 'notfound'; } /* state: enum('notfound','closed','opening','redirect') */ switch( $hostinfo->state ) { case 'closed': sivustosuljettu(); break; case 'notfound': eisivustoa(); break; case 'redirect': if( !empty($hostinfo->destination) ) redirect( $hostinfo->destination ); else eisivustoa(); break; case 'opening': domainaukeaa(); break; case 'service': huoltokatko(); break; default: eisivustoa(); } die(); function redirect( $destination ) { ob_clean(); header("HTTP/1.1 301 Moved Permanently"); header( 'Location: '.$destination ); } function domainaukeaa() { header('HTTP/1.1 503 Service Temporarily Unavailable'); print '