Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: using proxy servers with lwp::simple or useragent

by sulfericacid (Deacon)
on Mar 22, 2006 at 04:38 UTC ( [id://538403]=note: print w/replies, xml ) Need Help??


in reply to using proxy servers with lwp::simple or useragent

If you'd have done a search, I think you'd have found exactly what you were looking for. Take a look at LWP::Simple setting a proxy.

If your proxies don't require authentication, this should work

$ENV{HTTP_proxy}="http://proxy.company.com:80";
All you'd have to do is prepare your list in the array and loop over it while doing all the fun stuff inside.

Hope this helps.



"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

sulfericacid

Replies are listed 'Best First'.
Re^2: using proxy servers with lwp::simple or useragent
by Anonymous Monk on Mar 22, 2006 at 04:50 UTC
    that's exactly what i was looking for!!! thanks man
      Actually with more testing it didn't work. Maybe it's working but I don't understand? Should this be hitting my web site under a new IP address every time?
      use strict; use warnings; use LWP::Simple; my @list = qw(211.202.1.52:80 61.139.87.132:80 72.13.246.65:3128 203.1 +15.10.11:80 203.115.10.38:80); foreach my $prox (@list) { $ENV{HTTP_proxy}= $prox; my $url = "www.sensationalscentsonline.com"; print "$prox attempted..\n"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-25 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found