Hi,
back on the same thing as before:
See Orig msg below.
As I only want to know if the page is available for browsing, what are the
result codes I should look for.
and another question:
If I want to read the page title and meta tags, how do I get the content, I
looked into HTTP:: But got lost, any ideas?
Bruno
------------------------------------------------------------
----- Original Message -----
From: "Bruno Veldeman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 06, 2001 1:38 PM
Subject: Link check problem.
> Hi,
>
> I am doing a sub for checking if a URL is active or not.
>
> The problem is that for some sites it does not work.
>
> Here's the sub
>
> sub checklink{
>
> my ($url) = @_;
>
> my $ua = new LWP::UserAgent;
> my $request = new HTTP::Request GET => $url;
> my $response = $ua->request($request);
>
> if ( $response->is_success ){
> return(1);
> }
> else {
> return(0);
> }
> }
>
> If I try it on http://www.grn.es it works ($response->code = 200)
> But with http://encarta.msn.es it returns 0. ($response->code = 500)
>
> Am I missing something?
>
> Bruno Veldeman
>