|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Setting Cookies and then setting them to expire...
Ok, I am able to set a cookie that looks like this in my cookie folder after set:
administrator@thedomain.com first question: can I set the name to anything other than administrator. the code I used to set it originally was: print 'Set-Cookie: customer=$randnum; expires=$cookiedate; path=/; domain=.thedomain.com;\n'; where $cookiedate = gmtime(time + 3600) second question: how do I then access this cookie and remove the $randnum from the customer? Will another print "Set-Cookie: customer=; expires=$cookiedate; path=/; domain=.thedomain.com;\n"; work just fine? because Ive tried that, and not only is the cookie not changing, but a new cookie also is not being written... I would appreciat any advice. Thanks. Is there a way to clear the header or something? I think that the cookie is being stored in the header even because when I manually delete the cookie from my hard drive, It still sticks around...only when in IE I click on tools, and Internet options and delete cookies from there does my cookie dissapear without shutting down my browser. Is that because doing it through IE clears the header and deleteing it from the hard drive does not. Thanks
__________________
Dave |
|
#2
|
|||
|
|||
|
As far as the adminstrator@domain.com goes you cannot change that. administrator is the current user of that machine. It's done this way so if the person at that machine uses multiple users on one computer, each of them can have a different cookie.
All of your other questions can be answered by reading HTTP::Cookies documentation by doing perldoc http::cookies or you can search for cookies on perldoc.com Hope this helps!! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Setting Cookies and then setting them to expire... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|