I need to do a site redirects to a page after 21.45 to 10.00 I need a script that would do a redirect site to another page at a certain time.
Here's what happened.
<?php
$date = new DateTime('now');
$date->setTimezone(new DateTimeZone('Europe/Athens'));
if ($date->format('H')>=10 && $date->format('H')<=21 ){
if ($date->format('H')==21 && $date->format('i')<45)
echo "<script>window.location = '/'</script>";
else if($date->format('H')<21)
echo "<script>window.location = '/'</script>";
}
?>