It exists differents manner to compare a date with another, i don't know if you already know it !
you can try something like this :
you can try something like this :
PHP Code:
function game_is_okay($todays_date){
$exp_date = "2006-01-16"; // You can read it from a file, or create it manually, i don't know...
$today = strtotime($todays_date);
$expiration_date = strtotime($exp_date);
if ($expiration_date > $today) {
return 1;
}
else {
return 0;
}
}
$date = date("Y-m-d");
if (game_is_okay($date)){
// Do the game !
}
else {
// echo "error ! please wait ...etc";
}