mingke has asked for the wisdom of the Perl Monks concerning the following question:
$pmc_string = "http://www.pubmedcentral.nih.gov/tocrender.fcgi?action= +cited&tool=pubmed&pubmedid=17061271"; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get($pmc_string, 'User-Agent' => 'Mozilla/5.0 [en] (Windows; U; Windows NT 6.0)', 'Accept' => 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, i +mage/png, */*', 'Accept-Charset' => 'iso-8859-1,*,utf-8', 'Accept-Language' => 'en-US', ); if ($response->is_success) { print $response->content; } else {die $response->status_line;}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting Error 503 with LWP::UserAgent
by pc88mxer (Vicar) on Jun 16, 2008 at 05:00 UTC | |
|
Re: Getting Error 503 with LWP::UserAgent
by kabeldag (Hermit) on Jun 16, 2008 at 06:59 UTC | |
|
Re: Getting Error 503 with LWP::UserAgent
by ikegami (Patriarch) on Jun 16, 2008 at 05:04 UTC |