everlast88az has asked for the wisdom of the Perl Monks concerning the following question:
use HTTP::Cookies; use WWW::Mechanize; use LWP::UserAgent; my $ua = LWP::UserAgent->new(); my $mech = WWW::Mechanize->new(); $mech->cookie_jar(HTTP::Cookies->new()); my $url = "****"; my $url2 = "****; my $username = "***"; my $password = "*****"; $subject = "dhdfghdfghfgh"; $message = "blah"; $mech->get($url); #my @names = $mech->forms(); $mech->form_number(2); $mech->field(username => $username); $mech->field(password => $password); $mech->click(); $mech->success or die "post failed: ", print $mech->response->status_line; $mech->get($url2); #my @names = $mech->forms(); $mech->form_number(2); $mech->field(subject => $subject); $mech->field(message => $message); $mech->click(); $mech->success or die "post failed: ", print $mech->response->status_line;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Form won't post
by missingthepoint (Friar) on Apr 06, 2009 at 08:50 UTC | |
|
Re: Form won't post
by Gangabass (Vicar) on Apr 06, 2009 at 08:59 UTC |