title: php curl post request
body: <p>I wrote this code to send a post request</p>
  
  <pre><code>$ch = curl_init("http://www.exemple.com");
  curl_setopt($ch, CURLOPT_COOKIE, "PHPSESSID=32chars; prsess_******=32chars; login_******=55chars");
  curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
  curl_setopt($ch, CURLOPT_POST, TRUE);
  curl_setopt($ch, CURLOPT_POSTFIELDS, array("type" =&gt; "1"));
  curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-type: application/x-www-form-urlencoded; charset=UTF-8"));
  curl_setopt($ch, CURLINFO_HEADER_OUT, TRUE);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  $page = curl_exec($ch);
  print $head = curl_getinfo($ch, CURLINFO_HEADER_OUT);}
  curl_close($ch);
  </code></pre>
  
  <p>But I'm getting this as a header</p>
  
  <pre><code>POST / HTTP/1.1
  User-Agent: Mozilla/5.0 ...
  Host: www.exemple.com
  Accept: */*
  Referer: http://www.exemple.com/page.php
  Cookie: PHPSESSID=32chars; prsess_******=32chars; login_******=55chars
  Content-Length: 140
  Expect: 100-continue
  Content-type: application/x-www-form-urlencoded; charset=UTF-8; boundary=----------------------------0636ec3c1d17
  </code></pre>
  
  <p>Can someone tell me why <code>type=1</code> is not listed?</p>