NetInquire

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top