note 26956 deleted from function.session-cache-expire by sniper

From: Date: Wed, 19 Feb 2003 23:56:12 +0000
Subject: note 26956 deleted from function.session-cache-expire by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-44232@lists.php.net to get a copy of this message
In combination with the session cookie you can keep the session expire time at server side the same as the session cookie timeout at client side.. <? if(!isset($_SESSION)) session_start(); $expire=60*60*24*7*52; # sec, min, hours, days, weeks ? # Client setcookie(session_name(), session_id(), time()+$expire, "/"); .... # Server session_cache_expire($expire); ?> This works fine for my sites..

« previous php.notes (#44232) next »