#######################
IIRC, LWP::Simple does not perform automatic redirects. You will need to use
LWP::UserAgent and LWP::Request.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
#######################



Thankyou,

I have set the same thing up now using using the following:

my $ua = LWP::UserAgent->new(env_proxy => 1,
                              keep_alive => 1,
                              timeout => 30,
                              agent => 'NPS-PageGrabber\1.01 '
                             );
   push @{ $ua->requests_redirectable }, 'GET';
my $request = HTTP::Request->new('GET', "$return_query");
my $response = $ua->request($request, "$file");

It is retrieving pages now, much as getstore was before...

Seems to be working as well... (though the agent string isn't working yet.)

Thankyou very much,

much appreciated.

regards

Frank



-----Original Message-----
From: Keary Suska [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 October 2002 12:41 AM
To: Libwww Perl
Subject: Re: getstore and redirects..


on 10/1/02 5:25 AM, [EMAIL PROTECTED] purportedly said:

> I am new to this list, LWP in general, and only been using perl for a year
> or so...
> so please bare with me if I forgot a place to RTFM..
>
> I am fetching a page with LWP::Simple
>
> use LWP::Simple qw(getstore);
> my $result = getstore( $page, $file);
>
> now $page normally is just another perl script that prints HTML depending
on
> its query string..(always using GET)
> whick works great.
>
> but in some instances, this perl script uses a:
>
> print "location: $another_page\n\n";

IIRC, LWP::Simple does not perform automatic redirects. You will need to use
LWP::UserAgent and LWP::Request.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"


Reply via email to