NYCPHP Meetup

NYPHP.org

[nycphp-talk] How do I create a future date for a cookie?

John Lacey jlacey at ix.netcom.com
Fri Sep 5 10:46:24 EDT 2003


dare I say that we will all expire before Phil's cookie?   :)



Brian Pang wrote:

>what's so kludgey about this, Phil?
>
>I'm actually curious why you want it set soooo far into the future?
>
>I usually only set it for 3 months on the long end.
>
>It's highly unlikely that your site will still exist in its current form
>in 100 years from now, let alone 2 or 3. Of course, you can always be
>optimistic. :)
>
>I don't know of any date limitations since I never look ahead that far
>(cookies, life, coding, etc), so I would go by tbe guidance of others
>regarding the 2038 date.
>
>
>
>  
>
>>This is a multi-part message in MIME format.
>>
>>
>>well this is what I came up with, it's a kluge but it's the best I can
>>    
>>
>think of:
>  
>
>>setcookie('myCookie', $val, time() + (86400 * 36500)); // SET TO 100
>>    
>>
>YEARS FROM NOW
>  
>
>>Phil
>>
>>  ----- Original Message ----- 
>>  From: Phil Powell 
>>  To: NYPHP Talk 
>>  Sent: Thursday, September 04, 2003 2:22 PM
>>  Subject: [nycphp-talk] How do I create a future date for a cookie?
>>
>>
>>  I'm using setcookie() that I want to set "permanently" (set it to
>>    
>>
>like 100 years from now), but looking up both date() and mktime()
>honestly made no sense to me as to how to do it.
>  
>
>>  So, um, how do I do it?
>>
>>  Thanx
>>  Phil
>>
>>
>>
>>    
>>
>------------------------------------------------------------------------------
>  
>
>>  _______________________________________________
>>  talk mailing list
>>  talk at lists.nyphp.org
>>  http://lists.nyphp.org/mailman/listinfo/talk
>>
>>
>>    
>>
>
>
>
>_______________________________________________
>talk mailing list
>talk at lists.nyphp.org
>http://lists.nyphp.org/mailman/listinfo/talk
>
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030905/7c72942b/attachment.html>


More information about the talk mailing list