Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 6th, 2001, 11:14 AM
dave_mwi dave_mwi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 93 dave_mwi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 40 m 53 sec
Reputation Power: 8
Send a message via AIM to dave_mwi
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

Reply With Quote
  #2  
Old June 6th, 2001, 08:57 PM
dkode dkode is offline
PHP/PERL/.NET Coder
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Daytona Beach, Florida
Posts: 36 dkode User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 sec
Reputation Power: 8
Send a message via AIM to dkode
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!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Setting Cookies and then setting them to expire...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT