title: Send PUT request with PHP cURL
body: <p>I'm trying to communicate with a web service who's waiting first a token in each request.
  There is my problem, the web service is waiting the token throught <code>file_get_contenst(php://input)</code>.</p>
  
  <p>I didn't find a way to send cURL request trought this method (sending raw data/put data instead of Post).
  Could some one guides me ?</p>
  
  <p>I tried something like :</p>
  
  <pre><code>$fp = fopen('php://temp/maxmemory:256000', 'w');
  fwrite($fp, TOKEN);
  fseek($fp, 0);
  curl_setopt($ch, CURLOPT_INFILE, $fp); // file pointer
  curl_setopt($ch, CURLOPT_INFILESIZE, strlen($json));
  </code></pre>