Getting cookies expiration date and time?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gardnern

    Getting cookies expiration date and time?

    Is it possible to get the expiration date/time of a cookie?
    I need to limit someone to visiting a couple of pages for 45 minutes
    max and would like to show them how much time they have left. I dont
    think a javascript timer will work, because the timer should continue
    where it left off at on the previous page. Any suggestions?

  • Geoff Berrow

    #2
    Re: Getting cookies expiration date and time?

    I noticed that Message-ID:
    <1123709116.702 018.21690@z14g2 000cwz.googlegr oups.com> from gardnern
    contained the following:
    [color=blue]
    >Is it possible to get the expiration date/time of a cookie?
    >I need to limit someone to visiting a couple of pages for 45 minutes
    >max and would like to show them how much time they have left. I dont
    >think a javascript timer will work, because the timer should continue
    >where it left off at on the previous page. Any suggestions?[/color]



    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    • Andy Hassall

      #3
      Re: Getting cookies expiration date and time?

      On 10 Aug 2005 14:25:16 -0700, "gardnern" <nathan@factory 8.com> wrote:
      [color=blue]
      >Is it possible to get the expiration date/time of a cookie?
      >I need to limit someone to visiting a couple of pages for 45 minutes
      >max and would like to show them how much time they have left. I dont
      >think a javascript timer will work, because the timer should continue
      >where it left off at on the previous page. Any suggestions?[/color]

      Cookie expiry time isn't sent to the server, so you cannot get this from PHP.

      It doesn't even appear to be available to Javascript on the client side:



      You could always set another cookie storing the expiry time of the first
      cookie...

      --
      Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
      <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

      Comment

      Working...