Newbie LWP Question on multi-stage forms...

T

TB

I am fairly new to the Perl and LWP world but completely consumed by
the power and flexibility.

I am trying to load an initial page which prompts for a userID password
(not htaccess or realms) that is application driven. I create a new
UserAgent, then do a post with the user and password fileds. Seems to
work, returns "200 OK" in the success field...but doesn't seem to care
what password I use (unlike when I manual type it in a browser). Any
help would be appreciated (I tried WWW::Mechanize too, same results).

Once past that, I need to enter two date fields, then click a link.

What's the best method to accomplish this? Any help/samples
appreciated...meanwhile I am hacking away at the Perl & LWP book with
much success on their samples...just not on my code.
Please, go easy on me...and I promise to be a good Perl convert.
 
S

Sherm Pendley

TB said:
I am trying to load an initial page which prompts for a userID password
(not htaccess or realms) that is application driven. I create a new
UserAgent, then do a post with the user and password fileds. Seems to
work, returns "200 OK" in the success field...but doesn't seem to care
what password I use (unlike when I manual type it in a browser).

That goes with the territory - since the page you're fetching isn't
using HTTP authorization, the HTTP status you get back isn't going to
indicate whether or not your login succeeded. Whether the password was
correct or not, the CGI ran without problems and produced correct
output, so the "200 OK" status is appropriate.

To determine whether your login was a success, you need to parse the
result (I assume it's HTML) to look for the relevant text.
Once past that, I need to enter two date fields, then click a link.

What's the best method to accomplish this?

Have a look at WWW::Mechanize.

sherm--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top