Hi,
The following block of code is causing a "501 Protocol scheme 'http' is not supported" error. Any suggestions as to why this might be happening, the version of perl is pretty old (v5.003 i think) but it's being hosted on a remote server.
I tried using Mechanize but couldn't get it working using a library from my own version of perl (not compatible with v5.003) so have gone for the Useragent approach, which again works fine on my own server just not on the remotely hosted site.
Rob Waite
The following block of code is causing a "501 Protocol scheme 'http' is not supported" error. Any suggestions as to why this might be happening, the version of perl is pretty old (v5.003 i think) but it's being hosted on a remote server.
Code:
my $ua = LWP::UserAgent->new;
$ua->agent('Mozilla/5.0');
my $response = HTTP::Request->new('GET', '[URL unfurl="true"]http://uk.shopping.com/');[/URL]
my $response = $ua->get('[URL unfurl="true"]http://uk.shopping.com/');[/URL]
print $response;
if ($response->is_success) {
my $text = $response->content; # or whatever
} else {
die $response->status_line;
}
Rob Waite