NYCPHP Meetup

NYPHP.org

[nycphp-talk] Fw: reading cookie expirations

-sry sryBoston at hotmail.com
Tue Feb 3 17:41:47 EST 2004


Hiya,

A fellow wwwacie is trying to do something that seems
to me to be perfectly straightforward, but either I'm still
far more ignorant of PHP than I thought (I've *been*
reading, nearly every day!! Geez, there's enough docs
on that site to make me go blind!!) or this just can't be
done. Below is his post / request - he's cc'd on this note
so please cc him on replies.

In an off-list continuation, he noted, that the
$HTTP_COOKIE_VARS array is just an array of
cookies, not an array of values for *a* cookie. Is he
right? :-( Really? :-(((( bahhhh....so how do we get
the other stuff besides name and value? now *I*
want to know!

-sry
----- Original Message -----
From: "Rahmin Pavlovic" <rahmin at insite-out.com>
To: <wwwac at lists.wwwac.org>
Sent: Tuesday, February 03, 2004 3:55 PM
Subject: Re: [wwwac] php: reading cookie expirations


>
> Let me try this again -
>
> I'm setting a cooking via php like ye -
>
>     setcookie("name","value", time() + 86400); //24hrs
>
> Sometimes it's 30 days -
>
>     setcookie("name","value", time() + (86400*30)); //30 days
>
> Sometimes it's one year -
>
>     setcookie("name","value", time() + 31536000); //1yr
>
> Works fine.
>
> I want to be able to then read the cookie and determine it's expiry date.
>
> Seems simple enough, but it appears as tho all my read options are limited
to 'value'.
>
> Is there anyway to test a cookie's expiration date in php?
>
> Or better yet - is there any way to read the fully qualified cookie
string?
>
> name=value; expires=date; path=path; domain=domain-name; secure
>
> You know, cause that would be hot.
>
> I can do this in js, but I'd rather not..
>
>
>
>
> ##  The World Wide Web Artists' Consortium   ---   http://www.wwwac.org/
##
> ##  To Unsubscribe, send an e-mail to: wwwac-unsubscribe at lists.wwwac.org
##
>
>



More information about the talk mailing list