Perl Cookie Generator
yes plz, read and write would be nice. hopefully it's better than what i use now so i can use a better cookie read/write script.
------------------
Thumbs up or down ratings of the best and worst ways to make $$$ on the net. CLICK 4 CASH! from Affiliate Programs and Ad Networks
Traffic-Website.com free traffic, affiliate programs, hosting, & domain names.
My Site got hacked, but i'm coming back?
Orpheus posted this at 05:38 — 19th March 2000.
They have: 568 posts
Joined: Nov 1999
It's added
Orpheus posted this at 06:48 — 19th March 2000.
They have: 568 posts
Joined: Nov 1999
check out my latest nifty program at http://perlshell.com/ps/scripts/cookie/cookie.cgi , it's a utility that will generate cookies for your CGI/Perl scripts.
Feedback is more than welcome about anything except the design.
Rob Pengelly posted this at 15:48 — 19th March 2000.
They have: 850 posts
Joined: Jul 1999
Nice script!
Now just print out the code to read the cookie also, and it will be perfect
------------------
Patrick is my hero.
Edge posted this at 02:16 — 25th March 2000.
They have: 117 posts
Joined: Mar 2000
Neat script! But when I try to use it...
print "Set-Cookie: name=value; path=/yourname; expires=$expdate; domain=yoursite.com\n";
That prints out as text on the page reading:
Set-Cookie: name=value; path=/yourname; expires=$expdate; domain=yoursite.com
Any way to fix this??
--Edge
Rob Pengelly posted this at 02:26 — 25th March 2000.
They have: 850 posts
Joined: Jul 1999
Edge:
Do you have
print "Content-type:text/html\n\n";
before you set the cookie? I beleive you must set cookies before priting out any headers.
------------------
The most used and accepted excuse for missing classes in University is "My Grandmother Died".
http://www.wiredstart.com : The Technology Start Page
[This message has been edited by robp (edited 24 March 2000).]
http://www.thehungersite.com - http://www.therainforestsite.com
http://www.ratemymullet.com - Beauty is only mullet deep.
Orpheus posted this at 02:31 — 25th March 2000.
They have: 568 posts
Joined: Nov 1999
I'll make a note about that when I update the page this weekend.
japhy posted this at 02:42 — 25th March 2000.
They have: 161 posts
Joined: Dec 1999
robp - technically, Set-cookie: ... and Content-type: ... are both headers. His problem was that he was printing the blank line BEFORE he was printing the Set-cookie header.
japhy posted this at 02:44 — 25th March 2000.
They have: 161 posts
Joined: Dec 1999
orph - nice program. personally, I use CGI::Cookie, because it does the hardest part for me -- the expiration date creation. You can pass it a value like "+3m" and it'll set the expiration date from 3 minutes from now. That way, you don't need to figure out the day of the week, etc.
------------------
--
MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve
Orpheus posted this at 20:01 — 25th March 2000.
They have: 568 posts
Joined: Nov 1999
Japh You need to print the set-cookie: before the print "Content-type: text/html\n\n"; If I remember correctly set-cookie is an HTTP header function and the browser does need to retrieve it before the html starts.
Edge posted this at 22:34 — 11th October 2000.
They have: 117 posts
Joined: Mar 2000
Hey, where'd your neat script go?! It's gone now.
--Edge
Orpheus posted this at 03:21 — 13th October 2000.
They have: 568 posts
Joined: Nov 1999
i had to take it down, cuz i lost it when the host transfered.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.