Hi, monks
I can't realize why my script don't want to save cookies to a file. Can you show me what's wrong?
And the output is:#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; use HTTP::Cookies; my $cookie_jar = HTTP::Cookies->new; my $ua = LWP::UserAgent->new; $ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Ge +cko/20051111 Firefox/1.5"); $ua->cookie_jar( $cookie_jar ); my $KEYWORD_TOOL_URL = "https://adwords.google.com/select/main?cmd=Key +wordSandbox"; my $req = HTTP::Request->new(GET => $KEYWORD_TOOL_URL ); my $res = $ua->request($req); print $cookie_jar->as_string(); $cookie_jar->save("/var/www/html/images/cookie.dat");
but at this point i have cookie.dat file with this content:Set-Cookie3: S="awfe=X4L006UNsxw:awfe-efe=X4L006UNsxw"; path="/"; doma +in=.google.com; path_spec; discard; version=0 Set-Cookie3: I="X/twsRQBAAA=.XKZGpa+G/d2H+Fw8FQr4PA==.8BjoI2BAzejIcK0I +vz/tOw=="; path="/select"; domain=adwords.google.com; path_spec; disc +ard; version=0
Why? Where is mistake?#LWP-Cookies-1.0
In reply to Cookies are not saved to disk by Gangabass
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |