Place in index.php:
Code:
<?php
session_start();
//check to see if the date and time is Thursday between 7pm and 9pm
if (date('H') >= 19 && date('H') <= 21 && date('l') == 'Thursday') {
$_SESSION['goforit'] = 'yes';
//or you can comment the above and put the chat functions here
}
else {
$_SESSION['goforit'] = 'no';
}
?>
Place in index2.php:
Code:
<?php
session_start();
if ($_SESSION['goforit'] == 'yes') {
//your chat stuff goes here
}
else {
header('Location: error.php'); //redirect to error page
}
?>
Hope this helps.
Bookmarks