This is what we have in contact.php
PHP Code:
<?php
// the online time will be from 14 to 16:59
// taking minutes into consideration was
// more trouble
/// so $onlineuntil should be realend - 1
$onlinefrom = 12; // in hours
$onlineuntil = 18; // in hours
// $date holds the current HH
$date = date('H', time());
if ( ! ($onlinefrom <= $date && $date <= $onlineuntil) ) {
header("Location: [url]http://www.realwebhost.net/contact1.php[/url]");
}
?>
This what we have in contact1.php
PHP Code:
<?php
// the online time will be from 14 to 16:59
// taking minutes into consideration was
// more trouble
/// so $onlineuntil should be realend - 1
$onlinefrom = 18; // in hours
$onlineuntil = 12; // in hours
// $date holds the current HH
$date = date('H', time());
if ($onlinefrom <= $date && $date <= $onlineuntil) {
header("Location: [url]http://www.realwebhost.net/contact.php[/url]");
}
?>
But it does not work.