Hi Cheers,
Thanks for your reply.
I tried the code. but it's not what i expect.
I done the extraction using LWP::UserAgent. but now i am expecting the same by using WWW::Mechanize.
In LWP::UserAgent i used the statement like '$req->proxy_authorization_basic($username, $password);' to access the proxy.
In WWW::Mechanize where i have to give my username and password for proxy server?.
The code i tried in LWP::UserAgent
use LWP::UserAgent;
my $ua = new LWP::UserAgent;
$ua->proxy(['http']=> 'http://11.12.5.20:3350');
my $url = 'http://www.yahoo.com';
my $req = HTTP::Request->new(GET => $url);
$req->proxy_authorization_basic($username, $password);
my $res = $ua->request($req);
if ($res->is_success) {
print $res->content;
}
Thanks,
PerlUser
|