title: CURL post data not the same as form submit
body: <p>I use <code>php</code> <code>cURL</code> to simulate posting data to server, but it not work the same as form submit.</p>
  
  <p><code>HTML</code> form code (it works):</p>
  
  <pre><code>form action="username:password@server.dev/abc" method="POST"&gt;
  &lt;input name='id' value='v1'&gt;
  &lt;input name='body:query' value='v2'&gt;
  &lt;input name='update' value='0'&gt;
  &lt;input name='body:par1' value='xx'&gt;
  &lt;input type='submit' value='GO'&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><code>CURL</code> code (not work):</p>
  
  <pre><code>$data = array('id'=&gt;'v1', 'body:query'=&gt;'v2', 'update'=&gt;'0', 'body:par1'=&gt;'xx');
  $header = array(
              'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0',
              'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
              'Accept-Language: en-US,en;q=0.5',
              'Accept-Encoding: gzip, deflate',
              'Cookie: wait=1',
              'Authorization: Basic ' . base64_encode("{$strUser}:{$strPass}"),
              'Connection: keep-alive',
              "Content-Type: application/x-www-form-urlencoded"
              );
  curl_setopt($ch, CURLOPT_URL, $strUrl);
  curl_setopt($ch, CURLOPT_HEADER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  $htmlDoc = curl_exec($ch);
  </code></pre>
  
  <p>"Not work" means the server return difference response.</p>
  
  <p>One more thing is, when I submit the form above by <code>Firefox Developer Edition</code>, I open Network tab, click <code>Edit and Resend</code>, not edit any information, click <code>Send</code>. It not work too, the result as same as the result of <code>cURL</code> code.</p>
  
  <p>As I know, server is <code>IBM_HTTP_SERVER/1.3.19.1  Apache/1.3.20 (Unix)</code></p>
  
  <p>I don't have any ideal how it happens. Please teach me!</p>