title: PHP Cross Site XML
body: <p>I have this in file called abc.php, and this will return a valid xml document, instead of showing -string- labels at the end and beggining</p>
  
  <pre><code>header('Content-type: application/xml');
  $xml = file_get_contents("http://www.xxx.asmx/test?id=1"); //External web service
  $xmlstr = simplexml_load_string($xml);
  echo $xmlstr;
  </code></pre>
  
  <p>I want to use the valid xml data of abc.php, extract certain data, store it in my db, and check the output of the other server periodically, I've tried this:</p>
  
  <pre><code>ob_start();
  include 'abc.php';
  $result = ob_get_clean()
  </code></pre>
  
  <p>as well as this:</p>
  
  <pre><code>$xml = file_get_contents("abc.php"); 
  $xmlstr = simplexml_load_string($xml);
  </code></pre>
  
  <p>without success, any advice?</p>