$ip = $_SERVER['REMOTE_ADDR']; $allowed = array('1.1.1.1','2.2.2.2'); if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) { }