[MalaWiki] [TitleIndex] [WordIndex]

PowerBrowsingSlides/270 LWPUserAgent05

LWP::UserAgent - 05 - use cookies

use HTTP::Cookies;
$browser->cookie_jar( HTTP::Cookies->new( # or HTTP::Cookies::Netscape
    'file' => '/some/where/cookies.lwp',  # where to read/write cookies
    'autosave' => 1,                      # save it to disk when done
));

$kj = new HTTP::Cookies;
$kj->load("cookies.txt");
$ua->cookie_jar($kj); # activate cookie jar for the useragent


2014-06-11 14:17