PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am trying to Use SimpleXML to Work, a Very simple Echo of a Root. I cannot for the life of me figure this out. Any Help would be appreciated. Nothing will print.
<?php
$file = "http://weather.aero/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&stationString=KDEN&hoursBeforeNow=1";
// load file
$xml = simplexml_load_file($file) or die ("Unable to load XML file!");
// access XML data
echo 'Metar: '.$xml->metar->raw_text.'<br />';
?>