Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

RE: Getting a webpage through proxy

by Jonathan (Curate)
on Jul 14, 2000 at 14:45 UTC ( #22533=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2021-04-23 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?