Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I'm trying to get HTTP::ProxySelector working and not having much luck.
The script I'm using to test the module is set out below. When I run
the script it returns the homepage of the proxy selected rather than
the site I'm trying to access. I'd appreciate any suggestions as to
what's going wrong.




use strict;
use warnings;
use HTTP::ProxySelector;
use LWP::UserAgent;

my $selector = HTTP::ProxySelector->new(sites
=>[' '],
                                        testflag => 1,
                                        num_tries => 10,
                                        testsite => ' ');
my $ua = LWP::UserAgent->new();
print 'Selected proxy: ',$selector->get_proxy(),"\n";

my $url = " ";

my $response = $ua->get($url) or die $!;
my $content = $response->content() or die $!;

print "$content\n";

Site Timeline