I have been given an XML feed to get data from to use on a clients website, I have worked with XML before when the file is somfile.xml and for this I use simplexml_load_file, however the feed I have been given to work with is mmluxuryvillas.com/mmtoxml.php a PHP file. simplexml_load_file returns bool(false) when trying to read this file.
Below is the code I am using, which works if I create a test.xml file but not on the feed I have been given, how can I iterate through this data:
$url = "mmluxuryvillas.com/mmtoxml.php";
$xml = simplexml_load_file($url);
var_dump($xml);
foreach($xml->item as $item) {
echo "<p>".$item->inmueble."</p>";
}
Regards Rick