title: How can I send raw POST data with cURL? (PHP)
body: <p>I'm attempting to send raw POST data to a page using <strong>$HTTP_RAW_POST_DATA</strong>, but my attempts failed and an undefined index notice was given.</p>
  <p>I have attempted the following:</p>
  <pre><code>curl_setopt($handle, CURLOPT_POSTFIELDS, 'Raw POST data');   // Doesn't seem to work at all.
  curl_setopt($handle, CURLOPT_POSTFIELDS, array('Raw POST data'));   // 0 =&gt; Raw POST data
  </code></pre>
  <p>I did some research and some people had suggested sending a header (<em><strong>Content-Type: text/plain</strong></em>) in the request, which didn't seem to affect anything.</p>
  <p>Is there a solution for this issue?</p>