News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Brian Moon's Blog:
PHP session cookie refresh
May 14, 2008 @ 12:51:02

Brian Moon has posted a tip (and a bit of code) he's worked up to help make a users cookies last a bit longer than they were originally designed to:

When you start a session, if the user had no cookie, they get a new session id and they get a cookie. You can configure that cookie to last for n seconds via php.ini or session_cookie_set_params(). But, and this is a HUGE but for me, that cookie will expire in n seconds no matter what.

His method provides a way to extend the life of the cookies currently set for the domain by changing the time to live through a series of ini_get calls wrapped in a setcookie() call.

0 comments voice your opinion now!
cookie session refesh timetolive setcookie iniset


blog comments powered by Disqus

Similar Posts

IBuildings techPortal: Introduction to Silverlight for PHP developers

Kris Jordan's Blog: Towards RESTful PHP - 5 Basic Tips

Tobias Schlitt's Blog: Free eZ components sessions -2- [Update]

Jeremy Johnstone\'s Blog: \"Writing Your Own PHP Extensions: How & Why from A-Z\" at OSCON 2006

BinarySludge.com: Redundant and Fault Tolerant PHP Session Storage


Community Events











Don't see your event here?
Let us know!


install component dependency security language hack symfony2 package series opinion hhvm composer podcast framework unittest introduction overview application facebook release

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework