D
d2rk
I have problem. After transfer site from hosting to dedicated server,
one of the scripts stoped working:
== script.pl ===================================================
($data,$error)=inquiry("http://www.hostname.com/dir/file.html");
use LWP::Simple;
use LWP::UserAgent;
use URI::URL;
use HTTP::Request;
use HTTP::Headers;
sub inquiry
{
my $uri=shift;
my $hdrs=new HTTP::Headers(Accept=>'text/html');
my $ua =new LWP::UserAgent;
$ua->agent("Robot");
$ua->timeout(10);
my $response=$ua->request(HTTP::Request->new(GET=>$uri,$hdrs));
if( $response->is_success ){ return
($response->content,$response->content_length) }
else{ return (0,$response->status_line) }
}
================================================================
Result: 500 Can't connect to www.hostname.com:80 (Bad hostname
'www.hostname.com')
Script is working on other server's, telnet too.
Some people say, that this is due to the fact that DNS is tuned wrong.
one of the scripts stoped working:
== script.pl ===================================================
($data,$error)=inquiry("http://www.hostname.com/dir/file.html");
use LWP::Simple;
use LWP::UserAgent;
use URI::URL;
use HTTP::Request;
use HTTP::Headers;
sub inquiry
{
my $uri=shift;
my $hdrs=new HTTP::Headers(Accept=>'text/html');
my $ua =new LWP::UserAgent;
$ua->agent("Robot");
$ua->timeout(10);
my $response=$ua->request(HTTP::Request->new(GET=>$uri,$hdrs));
if( $response->is_success ){ return
($response->content,$response->content_length) }
else{ return (0,$response->status_line) }
}
================================================================
Result: 500 Can't connect to www.hostname.com:80 (Bad hostname
'www.hostname.com')
Script is working on other server's, telnet too.
Some people say, that this is due to the fact that DNS is tuned wrong.