Z
Zeke Koos
How do I use a different proxy for each request when using
LWP:
arallel ?
I use the following subroutine to register the requests, but when I
call $ua->wait(20) all the requests go through the last proxy
registered.
Please help!
thanks
Koos
sub register_request {
my ($url,$proxy) = @_;
$ua->max_hosts(25);
$ua->agent('Mozilla/4.5');
$ua->proxy('http', 'http://'.$proxy);
my $req = HTTP::Request->new('GET', $url);
$ua->register ($req);
}
LWP:
I use the following subroutine to register the requests, but when I
call $ua->wait(20) all the requests go through the last proxy
registered.
Please help!
thanks
Koos
sub register_request {
my ($url,$proxy) = @_;
$ua->max_hosts(25);
$ua->agent('Mozilla/4.5');
$ua->proxy('http', 'http://'.$proxy);
my $req = HTTP::Request->new('GET', $url);
$ua->register ($req);
}