Timed Redirect

<?php
//Timed Redirect
$visitor_ip = $_SERVER['REMOTE_ADDR'];
$current_time = time();
$launch_time = 1288589400;//Oct 31 11:30pm MST
$test_launch_time = 1288283536;//Change to whatever for testing

$ips_with_access = array('74.92.210.128','76.25.18.23');//IP's with access

if($current_time < $launch_time){
foreach($ips_with_access as $ips){
if($visitor_ip == $ips) $have_access = true;
}
if(!$have_access) header('Location: http://hyperspatial.com');//Redirect page
}
?>

0 Comments

You must be logged in to post a comment.