title: Dump XML Posts from 'php://input' to file
body: <p>I'm trying to write a parser for a xml postback listener, but can't seem to get it to dump the xml for a sample. The API support guy told me to use 'DOMDocument', maybe 'SimpleXML'? Anyways here's the code:           (thanks!)</p>
  
  <pre><code>&lt;?php
  $xml_document = file_get_contents('php://input');
  $doc = new DOMDocument();
  $doc-&gt;loadXML($xml_document);
  $doc-&gt;save("test2/".time().".sample.xml").".xml");
  ?&gt;
  </code></pre>