This code parses weather XML to display current temperature, sometimes it doesn't load the XML file and displays some PHP error code. What can be added to display "Temperature not available"
Here's the code:
<?php
$xml_vancouver = simplexml_load_file('http://www.weather.gov/xml/current_obs/CYVR.xml');
$vancouver = $xml_vancouver->temp_c; echo
$vancouver . "°";
?>