R
Rubel Kanubel
Hi!
I've created a script that automatically logs into a site and fills
out a form. I'm using the LWP::Useragent module. The first form (the
login form) is no problem getting through. Examplified by the
following:
<code>
my $req = POST 'http://www.acme.com/login.php', [ name => 'john', pass
=> 'password' ];
my $res = $ua->request($req);
</code>
here the "name" and "pass" parameters represents textfield form
elements. The second form I'm trying to send includes radio button
form elements. But it doesnt seem like I can pass parameters like
above for these elements.
The radio button name is "rad_query", and its possible values are
"alt_1", "alt_2" and "alt_3".. but the following does not work
<code>
my $req = POST 'http://www.acme.com/login.php', [ rad_query" => 'alt
1' ];
my $res = $ua->request($req);
</code>
I know that radio buttons in php is represented as an array.. but I'm
not sure if this is the same in perl.. so I have a problem: How do I
pass radio button form elements by using LWP::Useragent.
Any answers, comments, ideas etc. would be very much appreciated.
Thanks!
/Regards Rubel Kanubel
I've created a script that automatically logs into a site and fills
out a form. I'm using the LWP::Useragent module. The first form (the
login form) is no problem getting through. Examplified by the
following:
<code>
my $req = POST 'http://www.acme.com/login.php', [ name => 'john', pass
=> 'password' ];
my $res = $ua->request($req);
</code>
here the "name" and "pass" parameters represents textfield form
elements. The second form I'm trying to send includes radio button
form elements. But it doesnt seem like I can pass parameters like
above for these elements.
The radio button name is "rad_query", and its possible values are
"alt_1", "alt_2" and "alt_3".. but the following does not work
<code>
my $req = POST 'http://www.acme.com/login.php', [ rad_query" => 'alt
1' ];
my $res = $ua->request($req);
</code>
I know that radio buttons in php is represented as an array.. but I'm
not sure if this is the same in perl.. so I have a problem: How do I
pass radio button form elements by using LWP::Useragent.
Any answers, comments, ideas etc. would be very much appreciated.
Thanks!
/Regards Rubel Kanubel