in reply to Re: Hitting a web page
in thread Hitting a web page

This seems to have worked, with some exceptions. (BTW - thanks!)

I added $ua->proxy(['http','ftp'],'http://my.proxyserver.com:83');
The only problem seems to be that my proxy requires a password, and
reading throuhg perldoc LWP::UserAgent, I cannot find how I am
supposed to pass the username and pass that the proxy server
requires! I see how to pass them if the remote server needs them,
but not the proxy ones.

Are you at all familiar with this?

What does this little button do . .<Click>; "USER HAS SIGNED OFF FOR THE DAY"

Replies are listed 'Best First'.
Re: Re: Re: Hitting a web page
by swiftone (Curate) on Nov 29, 2000 at 22:41 UTC
    See RE: Getting a webpage through proxy, which has the following code:
    use LWP::UserAgent; #..... usual stuff .....# $ua = new LWP::UserAgent; $ua->proxy(['http', 'ftp'] => 'http://your_proxy.address.com:'); my $req = new HTTP::Request 'GET', "http://www.perlmonks.org"; $req->proxy_authorization_basic("$user_name","$user_password"); $res = $ua->request($req);

    (Obtained through Super Search for "LWP proxy password". Super Search is also your friend!)