Siva Prasad wrote:
use LWP::UserAgent ;
$ua = new LWP::UserAgent ;
$ua->agent("Mozilla/4.0") ; # Play with their minds
$req = new HTTP::Request 'GET',
'http://www.jimmyr.com:80/free_education.php' ;
$req->header('Accept' => 'text/html') ;
$res = $ua->request($req) ;
if($res->is_success){
print $res->content ;
} else {
print "Error: " . $res->code ." ". $res->message ;
}
But When I run the above code I am getting the following error.
Error: 500 Can't connect to www.jimmyr.com:80 (connect: Unknown error).
The code worked fine for me.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/