Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Trying to pass through firewall programmatically

by idnopheq (Chaplain)
on Sep 10, 2001 at 23:39 UTC ( [id://111548]=note: print w/replies, xml ) Need Help??


in reply to Trying to pass through firewall programmatically

From lpwcook in perldoc:

Some proxies also require that you send it a username/password in order to let requests through. You should be able to add the required header, with something like this:

use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->proxy(['http', 'ftp'] => 'http://proxy.myorg.com'); $req = HTTP::Request->new('GET',"http://www.perl.com";); $req->proxy_authorization_basic("proxy_user", "proxy_password"); $res = $ua->request($req); print $res->content if $res->is_success;
Replace proxy.myorg.com, proxy_user and proxy_password with something suitable for your site.

HTH
--
idnopheq
Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.

Replies are listed 'Best First'.
Re: Re: Trying to pass through firewall programmatically
by dze27 (Pilgrim) on Sep 11, 2001 at 00:07 UTC

    Yes!!! Thank you so much. As you might have gathered, this worked. I'm kicking myself a bit for not looking at the proxy stuff first.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-12-03 08:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found