Hello all.  I'm trying to write a script that logs in to a web page that has the user 
name and password input boxes as part of the initial web page.  I've tried doing a 
"POST" with the user name and password declarations and values in the request to no 
avail.  Here is my code:

my $myUserAgent = LWP::UserAgent->new;
$myUserAgent->agent("Automation/0.1");
my $myRequest = HTTP::Request->new(POST => 
"http://online.wsj.com/login?URI=%2Fdocuments%2Fdatabank.htm";);
$myRequest->content_type('application/x-www-form-urlencoded');
$myRequest->content("login=xyz&password=123");
my $myResponse = $myUserAgent->request($myRequest);

Any ideas on what I'm doing wrong?  I've double-checked the form input field names and 
they are "login" and "password".  Any help you could offer would be much appreciated.  
I've ordered the new PERL & LWP book but it hasn't gotten here yet so I thought I'd 
post this message.

Thanks,
Kenny Dubuisson, Jr.
Gulfport, Mississippi, USA

Reply via email to