cURL / Mailing Lists / curl-users / Single Mail

curl-users

Submit button can't be submitted by simply POST

From: Hailu Meng <hailumeng_at_gmail.com>
Date: Tue, 21 Apr 2009 14:59:24 +0800

Hi there,

I'm new to curl and want to use curl to log in one website, click some links
and then retrieve some information from the account. But when I used
curl -d "email=xxx_at_gmail.com&password=xxx&action=submit"
https://sellercentral.amazon.com
I can't log in. I think the data hasn't been POSTed to website. As you see,
this is amazon.com. Its submit form field is actually a button. The part of
html source is listed below. I'm thinking the submit method here is one
submit button, not general mode. So please help guide me how to handle this
kind of form field in curl.

Thanks a lot.

Lou

<form action="https://sellercentral.amazon.com/gp/sign-in/sign-in.html/ref=xx_login_lgin_home"
method="post" name="signin" onSubmit="changeOrgUnit()" >
<table class="titlebar-purple" cellspacing="0">
  <tr>
    <th>Sign in to your account</th>
  </tr>
</table>
<input type="hidden" name="protocol" value="https" />

<input type="hidden" name="action" value="sign-in" />
<table class="data-entry-purple" cellspacing="1">
  <tr><td>
   <table class="data-entry-purple" cellspacing="0"><tr><td
style="padding:10px">
    <table class="data-entry-purple" cellspacing="0">
     <tr><td nowrap width=100%" valign="middle"
style="text-align:right; font-weight:bold; padding:5px">
           E-Mail address:
         </td><td nowrap>
           <input type="text" id="email" name="email" size="30"
maxlength="64" />
     </td></tr>

     <tr><td colspan="2"><div style="line-height:5px;">&nbsp;</div></td></tr>
     <tr><td nowrap valign="middle" style="text-align:right;
font-weight:bold; padding:5px">
           Password:
         </td><td nowrap>
       <input type="hidden" name="destination"
value="https://sellercentral.amazon.com/gp/homepage.html?ie=UTF8&amp;%2AVersion%2A=1&amp;%2Aentries%2A=0"
/>
       <input type="hidden" name="optin" value="1" />
       <input type="hidden" id="ouid" name="ouid" value="01" />
       <input type="password" id="password" name="password" size="30"
maxlength="20" />
     </td></tr>
     <tr><td colspan="2" nowrap style="padding:5px;text-align:right">

    <button name="sign-in-button" id="sign-in-button"
class="amznButton" type="submit" onclick=""><table border="0"
height="22" cellspacing="0" cellpadding="0"><tr><td
id="sign-in-buttonLeft_" class="primaryLargeButtonL"
width="10px"></td><td id="sign-in-buttonMiddle_"
class="primaryLargeButtonText" nowrap align="middle">&nbsp;&nbsp;Sign
in&nbsp;&nbsp;</td><td id="sign-in-buttonRight_"
class="primaryLargeButtonR" width="13px"></td></tr></table></button>
     </td></tr><tr><td colspan="2" nowrap style="padding:5px;text-align:right">
         <span class="smaller"><a
href="https://sellercentral.amazon.com/gp/change-password/change-password-email.html/ref=xx_echgpasswd_lgin_home">Forgot
your password?</a> |
         <a href="javascript:loadHelp()">Help</a></span>
     </td></tr></table>
   </td></tr></table>
  </td></tr>

</table>

-- 
Reach me at my SIP phone:
http://embed.grandcentral.com/webcall/235b378ed3c893205c5a5bd098d29ac5

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-04-21