cURL / Mailing Lists / curl-users / Single Mail

curl-users

Banging my head against the wall: problem with duplicate field name?

From: Spam Trap <spamtrap42_at_gmail.com>
Date: Wed, 29 Jun 2005 19:34:11 -0400

I've been working on this problem for a couple of weeks now, and it's
driving me nuts.

I'm using curl with perl to navigate a complex series of forms. I
have everything working properly except the last page, which has two
fields with the same name. One is a Input Submit named "send", value
"send now"; the other is a hidden field named "send", value, "1804".
I've tried using two separate -d options, and also combining the two
fields into one with a separating comma. No luck. As far as I can
tell, curl is sending exactly the same page that mozilla does, but I
always get a failure with curl.

Does curl have a problem when sending identically named form fields?

I've talked with a developer at the site I'm trying to access. He
says they're not deliberately running the site to prevent curl or
similar programs from working, but (understandably) they won't support
such a non-standard method of accessing their site and can't offer
support.

The form I'm trying to fill in looks like this: (de-html-ized, and
stripped to the essentials)

   form method="POST" action="http://somewhere.com/" name="formname"
      input type="hidden" name="rsvp_email" value="email_at_somewhere.com"
      input type="hidden" name="rsvp_name" value="Newsletter"
      input type="hidden" name="pub_groups[]" value="38001"
      input type="submit"
onClick="document.formname.send_setting.value='now';" name="send"
value="send now"
      select name="send_month"
         option value="01" January/option
         option value="02" February/option
         (etc...)
      /select
      select name="send_day"
         option value="01" 1/option
         option value="02" 2/option
         (etc...)
      /select
      select name="send_year"
         option value="2005"2005/option
         (etc...)
      /select
      select name="send_time"
         option value="00:00:00" 12am/option
         option value="01:00:00" 1am/option
         (etc...)
      /select
      input type="checkbox" name="alert" value="1"
      input name="alert_email" type="text" size="20" value=""
      input type="submit"
onClick="document.formname.send_setting.value='scheduled';"
name="schedule" value="schedule it"
      input type="hidden" name="send_setting" value=""
      input type="hidden" name="num_members" value="1"
      input type="hidden" name="campaign_id" value="298000"
      input type="hidden" name="send" value="1804"
      input type="hidden" name="type" value="groups"
   /form

And the curl option file looks like this:

   -i
   -b cookies.txt
   -c cookies.txt
   -o output.html
   -d rsvp_email=email%40somewhere.com
   -d rsvp_name=Newsletter
   -d pub_groups%5B%5D=38001
   -d send=send+now
   -d send_month=06
   -d send_day=29
   -d send_year=2005
   -d send_time=18%3A00%3A00
   -d alert_email=
   -d send_setting=now
   -d num_members=1
   -d campaign_id=298000
   -d send=1804
   -d type=groups

What am I missing here? Any help would be appreciated. Thanks...
Received on 2005-06-30