- header: documentation ( source)
- simplexml_load_file: documentation ( source)
<?php
$filename = "Temperature";
header("Content-type: application/vnd.ms-excel");
header( "Content-disposition: filename=".$filename.".csv");
print "location, weather, obs_time, latitude, longitude, temp_f, wind_d, wind_deg, wind_mph";
print"\r\n";
$xml = simplexml_load_file('http://w1.weather.gov/xml/current_obs/KCHA.xml');
print $xml;
?>