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
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;
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:
ob_start();
include 'abc.php';
$result = ob_get_clean()
as well as this:
$xml = file_get_contents("abc.php");
$xmlstr = simplexml_load_string($xml);
without success, any advice?