Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Submit a form using perl module

by Anonymous Monk
on Jul 04, 2005 at 21:16 UTC ( #472303=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Is there any module to submit a form using a perl module? with out having to click the submit button manually? We are looking to automate some of the stuff. Thanks a lot Hemanth

Comment on Submit a form using perl module
Re: Submit a form using perl module
by Corion (Pope) on Jul 04, 2005 at 21:18 UTC

    Yes. There is WWW::Mechanize, which is the easiest method. There also is HTTP::Request, which is the hard way, and which is what WWW::Mechanize uses.

      The user places the request using LWP (LWP::UserAgent, even) rather than HTTP::Request, as shown in the following example:

      use HTTP::Request::Common; $ua = LWP::UserAgent->new; $ua->request(POST 'http://example.com/survey.cgi', [ name => 'Gisle Aas', email => 'gisle@aas.no', gender => 'M', born => '1964', perc => '3%', ]);

      HTTP::Request could have been used instead of HTTP::Request::Common.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://472303]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-07-25 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (170 votes), past polls