Code: Select all
<?php
$feed = simplexml_load_file('http://127.0.0.1/testxml.php');
echo $feed->test;
?>Example: "testxml.php" file contains something like:
Code: Select all
<?php
header('Content-Type: application/xml');
echo '<?xml version="1.0" encoding="UTF-8" ?>';
?>
<content>
<test><?php for ($i = 0; $i < 10; $i++) echo $i . ''; ?></test>
</content>