in reply to Filling in and Submitting a Form/Login Info

There is a module on CPAN that you should check out, maybe it will be useful. Its called: WWW::Mechanize http://search.cpan.org/~petdance/WWW-Mechanize-1.60/lib/WWW/Mechanize.pm
  • Comment on Re: Filling in and Submitting a Form/Login Info

Replies are listed 'Best First'.
Re^2: Filling in and Submitting a Form/Login Info
by perlpreben (Beadle) on Aug 21, 2009 at 22:05 UTC

    I agree... I use WWW::Mechanize all the time for this. You can also use LWP or something to have it manage cookies. Here is a quick code sample for you, to get started:

    use strict; use warnings; use WWW::Mechanize; use HTTP::Cookies; my $mech = WWW::Mechanize->new( agent =>$browser_agent); $mech->cookie_jar(HTTP::Cookies->new()); $mech->get($url_login); $mech->form_number($form_number); $mech->field('username' => $username); $mech->field('password' => $password); #Submit the form.. ahoy ahoy $mech->click();

    Just use Firefox addon Web Developer to lookup the form details with ease... thats my personal preference at least.

Re^2: Filling in and Submitting a Form/Login Info
by abijr (Novice) on Aug 21, 2009 at 21:32 UTC
    Sorry, didn't read all of leocharre's post.