When you would like to show a page only for a specified user or you wish to create a maintenance page, you may use this simple script:
// List of allowed IP addresses
$allowIP = array("87.6.45.33", "234.34.34.2"); // etc...
// Access denied
if( !in_array($_SERVER['REMOTE_ADDR'], $allowIP ) {
// include maintenance mode
die();
}
// Access grant and display the rest of view