in reply to POSTing information on a web page
I think you're going a quite roundabout way to filling in the form using WWW::Mechanize. WWW::Mechanize itself takes care of sending a correct Referer header, and you can fill in a form directly if you know the fields that are on it:
# Select the login form $mech->form_with_fields('user_name','user_pass'); $mech->set_fields( user_name => 'username', user_pass => 'secr1t' ); $mech->click('login'); print $mech->content;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: POSTing information on a web page
by b10m (Vicar) on Jun 16, 2008 at 15:22 UTC | |
Re^2: POSTing information on a web page
by clone4 (Sexton) on Jun 16, 2008 at 17:32 UTC |
In Section
Seekers of Perl Wisdom