in reply to Dealing with session cookies
Hi!
Could you post some more information on the error you get, and they way you followed to deal with cookies? Anyhow, you can easily do the job using LWP. Here's an example, which I took from lwpcook man page (it becomes available on you system when you install LWP):
use LWP::UserAgent; use HTTP::Cookies; + $ua = LWP::UserAgent->new; $ua->cookie_jar(HTTP::Cookies->new(file => "lwpcookies.txt", autosave => 1)); + # and then send requests just as you used to do $res = $ua->request(HTTP::Request->new(GET => "http://www.yahoo.no")); print $res->status_line, "\n";
Basically, this code creates a cookie jar for you and handles all cookie things automagically. It should be what you are looking for. ;-)
Michele.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Dealing with session cookies
by rphlb (Initiate) on Jun 29, 2004 at 18:05 UTC | |
by rphlb (Initiate) on Jun 29, 2004 at 19:22 UTC |
In Section
Seekers of Perl Wisdom