Solved

Completely Cookie  :)

Posted on 2006-11-17
3
328 Views
Last Modified: 2006-11-18
I've been informed that:
cookies are like such:

VisitNumber  <-- cookie name
5                 <-- cooke value
localhost/     <-- domain/path that can access the cookie
1024            <-- cookie type
1522925568 <-- expire date/time
29894292     <-- expire date/time
1043531296 <-- modified date/time
29820999     <-- modified date/time
*  <-- end

cookie type:  im not really sure where these come from or what they mean other than if they were client created(javascript) vs server created(asp).  it also indicates whether the connection is secure by adding a value of one to the number.
client created:  1088, 1104, 1600
server created: 1024, 1536, 3584
a secure server created example would be 1024 + 1 = 1025

the expire and modified date and times are based on nano seconds.  the second field has a max number of 2^32 or 4,294,967,296 (i had to look that up).  the first field counts how many times the second field has maxed out.  so above, the expire second field has hit the max value 1,522,925,568 times.  
to start on the date we take that number and multiply by the max value:
1,522,925,568 * 4,294,967,296 = 6,540,915,508,802,224,128
then we add whats in the second field:
6,540,915,508,802,224,128 + 29,894,292 = 6,540,915,508,832,118,420
now you have the number of nanoseconds from january 1, 1601 12:00:00am (utc)



how can I get these values?
0
Comment
Question by:kevp75
3 Comments
 
LVL 9

Accepted Solution

by:
deathtospam earned 450 total points
ID: 17965764
Here's some basic info on Cookies in ASP:

* MSDN - Setting Cookies in ASP using Response.Cookies: http://tinyurl.com/y64j46
* MSDN - Retrieving Cookies in ASP using Request.Cookies: http://tinyurl.com/y5tjrn
* General Tutorial - http://www.earthskater.net/devzone/asp/aspcookies.asp


I'm fairly certain that your ability to access cookies -- via ASP/VBScript, anyway -- is extremely limited, probably for security reasons.  All you can really do once a cookie is set, is display the names and values stored inside the cookie.  I don't believe you can access all of those properties you described above.


-= DeathToSpam =-
0
 
LVL 22

Assisted Solution

by:WMIF
WMIF earned 50 total points
ID: 17967121
i thought that you might have been able to get to the expire date, but according to that msdn article, nope.  oh well, at least you know what the cookie files mean now. :)
0
 
LVL 25

Author Comment

by:kevp75
ID: 17968053
thank you both.   I do understand how to set/retrieve cookies....my question was how to get the other stuff....but I see from those articles that those other keys are write-only....
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Adding Datediff to staistics page 2 62
Calculating value of records from a column - classic asp 7 87
Import csv files to MS SQL 5 85
If-Then-Else ASP problem 6 67
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question