Hi Perl Frieds, I am very new to perl world, i am writing a perl script to login in to page which expects username and password and after login in read the content of the next page. i have been getting the Authorisation failed message for the below code, please help the same user name and password works well in the browser Obviously i have removed username and password in the below code
#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; use HTTP::Request::Common; use HTTP::Cookies; my $user=""; my $pass=""; my $url="http://news.bankofamerica.com/EOS/EosDispatcher"; # define user agent my $ua=LWP::UserAgent->new(); $ua->agent("USER/AGENT/IDENTIFICATION"); # make request my $request=HTTP::Request->new(GET=>$url) or die "request failed : $!" +; # authenticate $request->authorization_basic($user,$pass) or die "Authorisation faile +d : $!"; # expect response my $response= $ua->request($request); print $response->content();
In reply to Logon Faied by Prashanth Sethalli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |