Sorry I'm still very new at this and there is probably an easier way to write this code. I want to have a contest page automatically redirect to another after a certain date. I have the code to turn on and off content after a certain date and I have code for a simple redirect, but I can’t figure out how to combine the two into something that doesn’t look ugly and complex. Any help would be greatly appreciated. This is what I have so far:
<?php $timeoff = '2012-02-10 00:00:00';
$timenow = date('Y-m-d H:i:s');
$showtxt = ($timenow >= $timeoff) ? false : true;
if ($timeoff = true);
header( "HTTP/1.1 301 Moved Permanently" );
header( "Status: 301 Moved Permanently" );
header( "Location: http://www.redirectsite.com" );
exit(0);
} else {
}
?>