If you need a post request, you should use LWP::UserAgent.use LWP::Simple; use URI::URL; my $url = url('http://www.perlmonks.org/index.pl?node_id=32057&lastnod +e_id=3628'); # Yes, the following is insecure and can be sniffed! $url->query_form(username => 'joe', password => 'schmoe'); $content = get($url);
The problem you have is the password. If you're using HTTP authentication, you should use the LWP::UserAgent module, which can easily handle said authentication (I am assuming that your issue is not wanting to send the password as plaintext). There is a way to do form submission with Perl over a secure server, but I can't find the reference right now :(
If you'd like to know the nitty-gritty about Web automation, check out Web Client Programming with Perl which is out of print, but available through the O'Reilly Open Books Project (how many publishers do you know who release out-of-print books for free over the web?).
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just go the the link and check out our stats.
In reply to (Ovid) Re: Form submission simmulation
by Ovid
in thread Form submission simmulation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |