View Single Post
Old 06-14-2003, 04:23 PM  
vending_machine
Confirmed User
 
Join Date: Jun 2002
Location: Seattle
Posts: 1,062
Quote:
Originally posted by Nezster
Basically I am iframing an active-x dialer code on one of my CJs and I want it to only show once every 24 hours to the same person.
Setting a cookie that lasts 24 hours:
Code:
<?PHP
setcookie(
'COOKIE_NAME',
'COOKIE_CONTENT',
time( ) + 86400,
'/',
$_SERVER[ 'SERVER_NAME' ] );
?>

To check for the cookie:
Code:
<?PHP
if ( $_COOKIE[ 'COOKIE_NAME' ] )
{
// then blah
}
?>
vending_machine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote