Using .htaccess 












Using .htaccess/.htpasswd Password Protection 





Coding Tips 








Uploads and Downloads 



Mail 
see it on this page





Working with Images 


Frequently Requested Website Functionality 
see it on this page
see it on this page
see it on this page
see it on this page











Using PHP 




Website Managment 








Other Tips 









Weather
Last Updated on Mar 10 2010, 12:53 am EST
<?php
// get the available xml file name for your area from
// http://www.weather.gov/data/current_obs/
$xmlFile = 'http://www.weather.gov/data/current_obs/KTPA.xml';
$weatherArray = @simplexml_load_file($xmlFile);
echo "<div style='width: 300px; padding: 20px; padding-bottom: 0px; margin: auto; border: solid 1px blue; font-size: 16px;'>";
if (!empty($weatherArray)) {
$image = $weatherArray->icon_url_base . $weatherArray->icon_url_name;
$alt = $weatherArray->weather;
echo "<img src='$image' alt='$alt' style='float: left; margin-right: 20px;' />
<b>$weatherArray->weather</b><br />
<b>$weatherArray->temperature_string</b><br /><br /><br />
The wind is <b>$weatherArray->wind_string</b><br />
The wind chill is <b>$weatherArray->windchill_string</b><br />
The visibility is <b>$weatherArray->visibility_mi miles</b><br />
The relative humidity is <b>$weatherArray->relative_humidity%</b><br />
The dewpoint is <b>$weatherArray->dewpoint_string</b><br />
The pressure is <b>$weatherArray->pressure_in\"</b>
<p style='text-align: center; font-size: 12px'>$weatherArray->observation_time</p>
";
} else echo "<span style='color: firebrick; font-size: 14px;'>There was a problem loading the weather data file.<br /><br />Please try again later.<br /><br /></span>";
echo "</div>";
?>
