sKunKbad Posted June 15, 2007 Share Posted June 15, 2007 session_set_cookie_params(604800); I could make this cookie last a long time by raising the number of seconds, but is there a way to make it last "forever"? Quote Link to comment https://forums.phpfreaks.com/topic/55745-everlasting-session-cookie/ Share on other sites More sharing options...
Wildbug Posted June 15, 2007 Share Posted June 15, 2007 I don't believe there is a "good forever" value that can be specified for cookies. Setting "0" makes it a session-only cookie. Most people set it for a long time into the future, like a few years. (60*60*24*365*2) Quote Link to comment https://forums.phpfreaks.com/topic/55745-everlasting-session-cookie/#findComment-275421 Share on other sites More sharing options...
atomicrabbit Posted June 15, 2007 Share Posted June 15, 2007 I agree. There is no true "forever" but what are the chances someone will keep the cookies on their computer for more than 5 years. And for that matter, what are the chances someone will keep their computer for more than five years, especially at the rate that technology is enhancing now-a-days Quote Link to comment https://forums.phpfreaks.com/topic/55745-everlasting-session-cookie/#findComment-275496 Share on other sites More sharing options...
sKunKbad Posted June 18, 2007 Author Share Posted June 18, 2007 I agree that there really is no need for a "forever" cookie, I was just curious. When you sign in to this forum it gives you a "forever" option, so I just wondered. Quote Link to comment https://forums.phpfreaks.com/topic/55745-everlasting-session-cookie/#findComment-276755 Share on other sites More sharing options...
Wildbug Posted June 18, 2007 Share Posted June 18, 2007 There's a PHP cookie on my computer now with an expiration of "2036-01-17 19:00:00". I might not be using PHPfreaks by 2036. Most sites like that will set a cookie far in advance and possibly reset it on each visit. Quote Link to comment https://forums.phpfreaks.com/topic/55745-everlasting-session-cookie/#findComment-276788 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.