a problem in socket programing in perl
Posted
by isu
on Stack Overflow
See other posts from Stack Overflow
or by isu
Published on 2010-05-11T10:05:11Z
Indexed on
2010/05/11
10:54 UTC
Read the original article
Hit count: 263
I write this code :
#!/usr/local/bin/perl
use strict;
use LWP::UserAgent;
my $ua = new LWP::UserAgent(agent => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5');
$ua->proxy([qw(http https)] => 'http://203.185.28.228:1080' #that is just socks:port);
my $response = $ua->get("http://www.google.com");
print $response->code,' ', $response->message,"\n";
but when i execute it i get this error: 500 Can't connect to 203.185.28.228:1080 (connect: timeout)
what am i going to do ?
© Stack Overflow or respective owner