471,889 Members | 2,522 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,889 software developers and data experts.

Problem with LWP::USERAGENT

Hello gurus,
I am using LWP::Useragent perl module to get a url from the
Code snippet:

#!perl -w

use LWP::UserAgent;
$ua = new LWP::UserAgent || die "$!";
$ua->proxy(['http', 'ftp'] => 'http://server/proxyname');

$req = new HTTP::Request 'GET',"http://www.perl.com/" || die "$!";
$req->proxy_authorization_basic("username", "password");
$res = $ua->request($req) || die "$!";
if ($res->is_success)
{ print $res->content }
{ print $res->error_as_HTML }
This seems to work indifferently . Becuase every time i run this it
print a page with my proxy server name etc.

<TITLE>internetgateway on servername</TITLE>

iPlanet 6.04 "internetgateway" instance on machinename

Can any body please help me with this .
Thanks in advance
Jul 19 '05 #1
0 2202

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Woogie | last post: by
reply views Thread by Playker | last post: by
2 posts views Thread by haimk63 | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.