Below are the codes used to execute this program:
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $browser = LWP::UserAgent->new( );
my $url = 'http://www.yahoo.com/';
my $response = $browser->get($url);
die "Hmm, error \"", $response->status_line( ),
"\" when getting $url" unless $response->is_success( );
my $content_type = $response->content_type( );
die "Hm, unexpected content type $content_type from $url"
unless $content_type eq 'text/html';
my $content = $response->content( );
die "Odd, the content from $url is awfully short!"
if length($content) < 3000;
While executing this program, i am getting this error message:
error "500 Can't connect to www.yahoo.com:80 (connect: Unknown error)"
Even, i tried to disable the firewall and stopped the firewall service.. still, the same problem exists.
Any help is appreciated...
where www.MYPROXY.COM:3128 is meant to represent the address and port number of my proxy server.