use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->agent('whatever IE6 say'); $ua->cookie_jar(HTTP::Cookies->new(file => "lwpcookies.txt",autosave = +> 1)); my $req = HTTP::Request->new(GET => 'http://...'); my $res = $ua->request($req); if ($res->is_success) { print $res->content; } else { print "Bad luck this time\n"; }
In reply to Re: Fetching web pages using
by Cine
in thread Fetching web pages using
by Baz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |