|
|
Joined: Mar 2002
Posts: 45
Member
|
Member
Joined: Mar 2002
Posts: 45 |
i need to make a script that will grab the cookie, the whole cookie, and nothing but the cookie...
haven't done much perl for a while and im not sure if you can do it
i need to write it to a file...
|
|
|
|
Joined: Aug 2000
Posts: 335
Member
|
Member
Joined: Aug 2000
Posts: 335 |
The easiest way is to use CGI::Cookie .
|
|
|
|
Joined: Mar 2002
Posts: 45
Member
|
Member
Joined: Mar 2002
Posts: 45 |
okay, but how do i use that to grab the WHOLE cookie, not just a single value...
i tried: %cookies = parse CGI::Cookie($ENV{COOKIE});
but im not quite sure if that does it, AND i dont exactly know how to get all the data from that without knowing a value...
|
|
|
|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
now you can use [code][/code]to print all values on the screen...
|
|
|
|
Joined: Aug 2000
Posts: 335
Member
|
Member
Joined: Aug 2000
Posts: 335 |
1) I'm not sure what you mean by the whole cookie. A cookie provided by a browser consists of a name and a value.
2) You should be able to use the fetch method, rather than the parse method on the environment variable.
3) I believe you need to use the value method to get the cookie's value from the hash value.
[code][/code]
|
|
|
|
Joined: Aug 2000
Posts: 335
Member
|
Member
Joined: Aug 2000
Posts: 335 |
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 449
Joined: February 2008
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|