Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Confused about LWP, Mechanize and UserAgent

by tomfahle (Priest)
on Jun 07, 2006 at 19:47 UTC ( [id://554132]=note: print w/replies, xml ) Need Help??


in reply to Confused about LWP, Mechanize and UserAgent

Hi, You can't do that with LWP::Simple. See http://search.cpan.org/~gaas/libwww-perl-5.805/lwptut.pod#HTTP_Authentication for a tutorial.
use strict; use LWP; my $browser = LWP::UserAgent->new; $browser->credentials( 'www.mydomain.com:80', # Look up this realm with your browser, eg. Firefox 'web_server_usage_reports', 'user_plinky' => 'Password_banjo123' ); my $url = 'http://www.mydomain.com/program.cgi?var1=apples&var2=bananas'; my $response = $browser->get($url); #......
Hope this helps

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://554132]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-24 00:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found