Hi Gang,Hey does anyone know if there is a simple free script / code which allows us to redirect a web site visitor to another page based on the time of day? I've found many for day of week, etc but not by our server time. We are a live character calling service and wish to redirect users to our closed page at the end of our business day as to stop orders from coming in for the day if any.Any help or script is appreciated.VoiceTOONS
Something like <?php // set the default timezone to use. date_default_timezone_set('America/New_York'); $hour = date('G'); //if after 1700 (5PM), send the user to the other page if($hour > 16) { header('location: http://www.oursite.com/ourclosedpage.html'); } ?> PHP: Note - if you don't set the time zone properly, you'll have to use whatever time your server is set to. IOW, if you want 6PM to be the trigger time, and your server is set to 3 hours later than your local time, you'll have to use 3, not 6, as the trigger.