Solved

Perl script LWP::UserAgent & proxies?

Posted on 2008-10-16
2
407 Views
Last Modified: 2012-05-05
I'm new to perl & not familiar with it at all... I have a script that creates a browser session with

my $browser = LWP::UserAgent->new;

it is called like this $browser->get($page_url, ":content_file"=>"tmp");

the question I have is, is it possible to define a proxy for the $browser object?

if so, how do I do that?
0
Comment
Question by:mcainc
2 Comments
 
LVL 6

Expert Comment

by:RSLE
ID: 22730146
0
 
LVL 13

Accepted Solution

by:
marchent earned 500 total points
ID: 22733043
Change the value of proxy_url from below code, format is IP:Port
my $proxy_url = "http://172.116.89.14:8801/";

$browser->proxy('http', $proxy_url);

Open in new window

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now