473,230 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,230 software developers and data experts.

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?

Aug 10 '05 #1
2 7714
I noticed that Message-ID:
<11*********************@z14g2000cwz.googlegroups. com> from gardnern
contained the following:
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?


http://uk.php.net/manual/en/function...kie-params.php

--
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/
Aug 10 '05 #2
On 10 Aug 2005 14:25:16 -0700, "gardnern" <na****@factory8.com> wrote:
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?


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:

http://www.quirksmode.org/js/cookies.html

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

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Aug 10 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Brian Burgess | last post by:
Hi all, Anyone know if this is possible? If so, on which page would the cookie be? .. On the page calling a function defined in the include file? thanks in advance.. -BB
7
by: Bert | last post by:
I have been reading the post and the FAQ and have been unable to find anything that will help with my problem. First let me say that I am not a web developer, designer and no next to nothing...
1
by: Michal A. Valasek | last post by:
Hello, I have problem deleting cookies and cookies values (using framework version 1.1 on W2003). When I try to remove entire cookie, by calling Response.Cookies.Remove("Test"), nothing...
4
by: Rickey Tom | last post by:
This has to be a very common question, but my search did not come up with an answer. I needed to set an expiration time for a cookie. In .NET, is seems that the server-side code is used to set...
3
by: Jim Kelly | last post by:
Hi, I'm having a strange problem with setting a cookie's expiration date. The relevant code is as follows: HttpCookie hc = new HttpCookie("MyCookie"); hc.Values.Add("UserName",...
2
by: news.microsoft.com | last post by:
I am having a difficult time with cookies. In my code, I need to allow a user to login to my admin site. I figure I can set a cookie, then authenticate them, and all should be well. This works,...
8
by: tshad | last post by:
I am trying to get my authentication to work and want the timeout to be 30 minutes, but only while the browser is active. If the browser closes, I want the cookie to disappear. Is this...
3
by: Phillip N Rounds | last post by:
I'm having trouble with using cookies to monitor the stages of login. I have a two stage Registration page ( register.aspx ) and my target page ( MyPage.aspx ) I'm using a cookie named LoginStatus...
5
by: Omer | last post by:
hi Everyone, I am using ASP.Net 2.0. When user logins, I check the credential and then made the cookie. My hoster's server is in Arizona region and I am in Pakistan. I set cookie's expiration time...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.