Newbie LWP Question on multi-stage forms...

Discussion in 'Perl Misc' started by TB, Dec 6, 2004.

  1. TB

    TB Guest

    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.
    TB, Dec 6, 2004
    #1
    1. Advertising

  2. TB wrote:

    > 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--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
    Sherm Pendley, Dec 7, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. salman sheikh

    4 stage register or fifo

    salman sheikh, Feb 18, 2004, in forum: VHDL
    Replies:
    2
    Views:
    517
    salman sheikh
    Feb 19, 2004
  2. Anoops
    Replies:
    1
    Views:
    625
    navneetcertain
    Aug 1, 2013
  3. Anoops
    Replies:
    0
    Views:
    516
    Anoops
    Sep 9, 2005
  4. Brian Folke Seaberg

    Initialization -- One Stage or Two Stage

    Brian Folke Seaberg, Jan 4, 2005, in forum: C++
    Replies:
    4
    Views:
    721
    Howard
    Jan 4, 2005
  5. Alan Silver
    Replies:
    2
    Views:
    346
    Alan Silver
    Jun 5, 2006
Loading...

Share This Page