> -----Original Message-----
> From: Senthil Kumar M. [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 30, 2002 2:37 AM
> To: [EMAIL PROTECTED]
> Subject: Fetching web pages and displaying as text
>
>
> Hi,
>
> I am trying out some scripts using lib-www perl (LWP) module.
> Unfortunately i am behind a firewall and our network uses a
> proxy. I am
> using the following script to fetch a page and display the
> contents. It
> does not work, the error message says:
>
> "501 (Not Implemented) Protocol scheme '' is not supported"
>
> The code is as follows:
>
> #!/usr/bin/perl
> use LWP::UserAgent;
> $ua = LWP::UserAgent->new;
> #$ua->env_proxy; # initialize from environment variables
> $ua->proxy(ftp => '172.16.0.1');
> $ua->proxy(http => '172.16.0.1');
Shouldn't this be in the form:
$ua->proxy(http => 'http://172.16.0.1');
> #$ua->no_proxy(qw(no se fi));
> my $req = HTTP::Request->new(GET => 'http://www.somewebsite.org/');
> print $ua->request($req)->as_string;
>
> Thanks a lot for your help.
>
> Senthil
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]