title: Reading raw POST/XML data from 3rd party application
body: <p>I am beginning a project with a 3rd party application that is supposed to be POSTing XML data to a URL that I provide when a certain action is completed. I also have the option in the 3rd party application of having it send the XML via email as well as POSTing to the URL I specify.</p>
  
  <p>I am receiving the XML email so I am certain that that works, but I am not entirely sure how I can tell when I receive the POST/XML data. </p>
  
  <p>The script that I wrote to test is the following. </p>
  
  <p>I've read lots of questions here and read through the PHP documentation, but as I'm still a beginner, I'm not sure if this is right.</p>
  
  <pre><code>&lt;?php
  
  echo "&lt;pre&gt;";
  print_r($_POST);
  var_dump($_POST);
  $xml = file_get_contents('php://input');
  print_r($xml);
  var_dump($xml);
  </code></pre>
  
  <p>So what I am doing is performing the action that triggers the 3rd party application to send the data, and then right after, I try running the PHP script to see if there's anything printed to my screen -- it's just that the <code>print_r()</code> and <code>var_dump()</code> of <code>$_POST</code> and <code>$xml</code> are empty.</p>
  
  <p>In theory is this how I would go about echoing out the data, simply as a first step to verify that I'm receiving it?</p>
  
  <p>If not, what can I do as a first step just to see that I'm receiving it?</p>