title: Use curl to post data to a form?
body: <p>I have a form like this:</p>
  
  <pre><code>&lt;form method="post" enctype="multipart-form-data" name="my_form" action="http://www.sms-online.web.id/kirim" &gt;
  
  &lt;input class="field text small" type="text" maxlength="20" name="Phonenumbers" /&gt;
  &lt;br /&gt;
  &lt;textarea rows="5" cols="20" onKeyPress=check_length(this.form); onKeyDown=check_length(this.form); name=Text &gt;&lt;/textarea&gt;
  &lt;br /&gt;
  &lt;input id="saveForm" class="btTxt" type="submit" value="KIRIM" name="TOMBOL" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Let's say that form is located at <code>http://myurl.com/form</code> How do I post to that form <strong>and then click the submit button</strong>? and what my file should look like? should it look like this or not:</p>
  
  <pre><code>Phonenumbers=08111111
  Text=SMScontent
  </code></pre>
  
  <p>I already tried this but didn't work:</p>
  
  <pre><code>curl --data "Phonenumbers=0811111&amp;text=testing&amp;TOMBOL=KIRIM" http://myurl.com/form
  </code></pre>
  
  <p>I tried <strong>@sputnick</strong> suggestion but got the following error:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html style="height:100%"&gt;
  &lt;head&gt;&lt;title&gt; 301 Moved Permanently
  &lt;/title&gt;&lt;/head&gt;
  &lt;body style="color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-color: #fff;"&gt;
  &lt;div style="height:auto; min-height:100%; "&gt;     &lt;div style="text-align: center; width:800px; margin-left: -400px; position:absolute; top: 30%; left:50%;"&gt;
          &lt;h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;"&gt;301&lt;/h1&gt;
  &lt;h2 style="margin-top:20px;font-size: 30px;"&gt;Moved Permanently
  &lt;/h2&gt;
  &lt;p&gt;The document has been permanently moved.&lt;/p&gt;
  &lt;/div&gt;&lt;/div&gt;&lt;div style="color:#f0f0f0; font-size:12px;margin:auto;padding:0px 30px 0px 30px;position:relative;clear:both;height:100px;margin-top:-101px;background-color:#474747;border-top: 1px solid rgba(0,0,0,0.15);box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset;"&gt;
  &lt;br&gt;Proudly powered by  &lt;a style="color:#fff;" href="http://www.litespeedtech.com/error-page"&gt;LiteSpeed Web Server&lt;/a&gt;&lt;p&gt;Please be advised that LiteSpeed Technologies Inc. is not a web hosting company and, as such, has no control over content found on this site.&lt;/p&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>