in reply to Getting a webpage through proxy

I raised this same question last week. Must admit the documentation seemed vague - I ended up looking though the pm file! Anyway I got it working with something like..

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);


Update - I've just seen that chromatic posted a virtually identical code snipet in answer to my original question.
Never saw it at the time Doh! That will teach me to give up on the perl monks.

Replies are listed 'Best First'.
Re: RE: Getting a webpage through proxy
by Anonymous Monk on Feb 07, 2001 at 22:36 UTC
    in reply to jonathan's posting of working code :

    Strange, i copy pasted this code, altered params where necessarry and it don't work.

    i get something like

    HTTP::Request=HASH(0x6ade884)
    HTTP::Response=HASH(0x6ca5aa0)

    as output

    must say i'm using perl/perlscript/asp on IIS 5.0

    Can anyone help me out, post a resource for this ?

    thanks,

    joris.lambrecht@pandora.be