11-23-2007, 05:37 AM
|
#3 (permalink)
|
|
The Wanderer
Join Date: Nov 2007
Posts: 20
Thanks: 1
|
Couldn't you just set the cookie to expire in 24 hours and if it exists, don't show the ad?
PHP Code:
if(!isset($_COOKIE['last_displayed'])) {
setcookie('last_displayed', date("Y-m-d h:i:s"), time() + (24 * 3600), '/');
echo 'Show Advert';
}
Instead of figuring out the the hours in the PHP. I always like to do as little as possible :)
Mubs
|
|
|
|