Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Getting a webpage through proxy

by lhoward (Vicar)
on Jul 14, 2000 at 00:58 UTC ( #22454=note: print w/replies, xml ) Need Help??


in reply to Getting a webpage through proxy

You can't do it with LWP::Simple, you have to use LWP::UserAgent to get proxy support....
require LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->proxy('http', 'http://proxy.sn.no:8001/'); $request = HTTP::Request->new('GET', 'http://www.perlmonks.org'); $response = $ua->request($request);
Note that $response is not just the text of the gotten page, it is an HTTP::Response object. See the HTTP::Response docs for info on how to handle the response.

Replies are listed 'Best First'.
Re^2: Getting a webpage through proxy
by Baz (Friar) on Jun 09, 2005 at 22:08 UTC
    Check out -
    $ua->proxy('http', 'http://proxy.name.ie:8001/');
    And this node

Log In?
Username:
Password:

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

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

    No recent polls found

    Notices?