Passing username and password using LWP::UserAgent



Hi,
I ve written a perl script which sends the user name and password
through a proxy for authentication,the problem is that after it is
getting authenticated it is not showing the contents of the desired
page i.e the page which the user wants to visit is not being displayed

code

use LWP::UserAgent;

$ua = new LWP::UserAgent;

$ua->proxy(['http'] => '<http://abc.com:389>');

$req = new HTTP::Request 'GET','http://xyz.com';

$req->proxy_authorization_basic('username','password');

$res = $ua->request($req);

print $res->content if $res->is_success;
print $ua->request($req)->as_string;

code

the problem with the above code is that it does not directs the user to
'http://xyz.com"; after authentication can anybody help me out please..

.



Relevant Pages

  • Re: NNTP Server responses from a perl script?
    ... I'm working on my second ever perl script for a school ... > Authentication Required" ... > However, in Perl, when I open a socket connection to a news server ... > response, everything hangs. ...
    (perl.beginners)
  • NNTP Server responses from a perl script?
    ... I'm working on my second ever perl script for a school assignment ... requires authentication, issue a command, and wait for a response, ... everything hangs. ...
    (perl.beginners)
  • Re: NNTP Server responses from a perl script?
    ... I'm working on my second ever perl script for a school assignment ... > Authentication Required" ... > requires authentication, issue a command, and wait for a response, ... > everything hangs. ...
    (perl.beginners)
  • Re: SMTP issue
    ... Robert Hicks wrote: ... --> DATA (wait upto 300 seconds) ... this says to me that there's something wrong with authentication or ... Compare the mail server logs from your perl script with your tcl script ...
    (comp.lang.tcl)
  • send username/password via perl script instead of using browser
    ... automate the authentication of the username and password. ... like to user a perl script but I'm not really sure about the steps. ... function resetear() { ...
    (comp.lang.perl)