title: Unformatted text coming from php://input
body: <p>I'm trying to pull data from php://input so that I can store the raw data into an XMLElement, so that I can then sort it, and compare the data to a table in one of my databases. I have also tried using $_POST and storing that but the problem that I ran into using $_POST was that I was not getting field headers so I could not store data. </p>
  
  <p>I'm currently using this code to retrieve the raw data from the http POST.</p>
  
  <pre><code>$PostContents = file_get_contents(php://input);
  echo $PostContents;
  </code></pre>
  
  <p>This is the data that is being returned from that code.</p>
  
  <pre><code>xml=%3COPS%3E+%0D%0A%3CAuthentication%3E%3CSecretKey%3Ex44%3C%2FSecretKey%3E+%0D%0A%3C%2FAuthentication%3E+%0D%0A%3CAction%3EUpdate+Person+Status%3C%2FAction%3E+%0D%0A%3CUpdatePersonStatus%3E+%0D%0A%3CPerson%3E+%0D%0A%3CName%3EDavid%3C%2FOrderNumber%3E+%0D%0A%3CAge%3EShipped%3C%2FOrderStatus%3E+%0D%0A%3CAddress%3EThird+Party%3C%2FAddress%3E+%0D%0A%3CPhone%3EUPS+Grd%3C%2FPhone%3E+%0D%0A%3C%2FPerson%3E%0D%0A%3C%2FUpdatePersonStatus%3E+%0D%0A%3C%2FOPS%3E+%0D%0A
  </code></pre>
  
  <p>Here is what is generating that output.</p>
  
  <pre><code>&lt;html&gt; 
  &lt;body&gt; 
  &lt;form action="http://172.16.100.116/php.php" method="post"&gt; 
  &lt;textarea name="xml" rows="20" cols="40"&gt;&lt;OPS&gt; 
  &lt;Authentication&gt;&lt;SecretKey&gt;x44&lt;/SecretKey&gt; &lt;/Authentication&gt; 
  &lt;OPS&gt; 
  &lt;Authentication&gt;&lt;SecretKey&gt;x44&lt;/SecretKey&gt; 
  &lt;/Authentication&gt; 
  &lt;Action&gt;Update Person Status&lt;/Action&gt; 
  &lt;UpdatePersonStatus&gt; 
  &lt;Person&gt; 
  &lt;Name&gt;David&lt;/Name&gt; 
  &lt;Age&gt;21&lt;/Age&gt; 
  &lt;Address&gt;123EasyStreet&lt;/Address&gt; 
  &lt;Phone&gt;6666666666&lt;/Phone&gt; 
  &lt;/Person&gt;
  &lt;/UpdatePersonStatus&gt; 
  &lt;/OPS&gt; 
  &lt;/textarea&gt; 
  &lt;input type=submit&gt; 
  &lt;/form&gt; 
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>(the html file used here is strictly for testing purposes the data that is coming through is within the  plus the header xml information.)</p>
  
  <p>So my question is what do I need to do to get the data from ('php://input') into a XML so I can sort it's information?</p>