On Sun, 30 Jun 2002 06:27:27 +0300, [EMAIL PROTECTED] (Octavian Rasnita)
wrote:

>Hi all,
>
>I've tried to get a web page with the following line:
>
>use LWP::Simple;
>my $page = get($path);
>
>The problem is that LWP gets another page telling me that I should login or
>I should enable my browser to accept cookies.
>
>What should I do to make LWP to accept cookies?
>Is it possible with LWP::Simple, or I should use LWP::UserAgent?

This is from a LWP howto at perlmonks.org, a great resource.

 If you want to do several requests, of which the first should include
 a login, or something else stateful which uses cookies, you can even
 attach a cookiejar to use with LWP::Simple:

use LWP::Simple qw($ua get);
use HTTP::Cookies;
   
$ua->cookie_jar(HTTP::Cookies->new);

get $webpage . $login_string;

my $logged_in_page = get $webpage . $private_page;





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to