I've used WWW::Mechanize before, but not for posting to a form on the
web. I'm trying to automate some very boring postings of spammers to the
rfci website. I'm not having much luck with it.
mech-dump tells me:
[EMAIL PROTECTED] new-1206]$ mech-dump
http://www.rfc-ignorant.org/tools/submit_form.php?table=whois
GET http://www.rfc-ignorant.org/tools/lookup.php
domain= (text)
POST http://www.rfc-ignorant.org/tools/submit.php
table=whois (hidden readonly)
domain= (text)
evidence= (textarea)
submit=List me! (submit)
NOTE: There are two fields named 'domain'. This is part of my problem I
think.
Also, If I try to explicitly put something in the 'evidence' field, it's
telling me there is no such field.
Here's a snippet of the applicable code:
my $browser = WWW::Mechanize->new();
# tell it to get the main page
$browser->get("http://rfc-ignorant.org/tools/submit_form.php?table=whois");
$browser->field("domain", $_); # there are two fields named domain
$browser->field("evidence", @body);
# $browser->set_visible( $_, @body );
$browser->click();
Thanks for any pointers where I'm going wrong.
Mike
--
The programmer's national anthem is 'AAAAAAAAHHHHHHHH'. -Weinberg, p.152
23:50:01 up 14 days, 13:16, 0 users, load average: 0.07, 0.29, 0.33
Linux Registered User #241685 http://counter.li.org