Nygeve has asked for the wisdom of the Perl Monks concerning the following question:
Everything is fine, until head request is working. For example this cool HP link can't be fetched with head request - server sends 500 (Internal Server Error). So, seems that i have to use get. But i don't want to make such traffic (there will be ~1500 of links that must be checked every day).use LWP; my $Browser = LWP::UserAgent->new; $Browser->agent("Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)"); $Browser->timeout(10); my $url = 'http://perlmonks.org'; my $Response = $Browser->head($url); if ($Response->is_success) { #OK } else { #BAD }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Checking page existance
by Zaxo (Archbishop) on Nov 03, 2003 at 03:47 UTC | |
|
Re: Checking page existance
by pg (Canon) on Nov 03, 2003 at 04:10 UTC | |
by PodMaster (Abbot) on Nov 03, 2003 at 08:22 UTC | |
by Nygeve (Acolyte) on Nov 03, 2003 at 04:34 UTC | |
|
•Re: Checking page existance
by merlyn (Sage) on Nov 03, 2003 at 12:04 UTC |