title: How to access POST data in PHP?
body: <p>I need to write a PHP page which would accept an XML document sent over a POST request like this:</p>
  
  <pre><code>POST /mypage.php HTTP/1.1
  Host: myhost.com
  Content-Type: application/xml
  Content-Length: ...
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;data&gt;
   ...
  &lt;/data&gt;
  </code></pre>
  
  <p>This is not data from some HTML form, just a plain XML document. </p>
  
  <p>How can I access this XML in my PHP code?</p>