NOAA RSS Top Warning 2.0 PHP Script
The script is back to being maintained by Ken True
NOAA ATOM/CAP Top Advisory Warning PHP scripthttp://saratoga-weather.org/scripts-atom.php#atomtopwarnNo longer BETARenamed to atom-advisory.php to avoid confusion and allow coexistence with
rss-advisory.php which used the RSS feeds instead of the ATOM/CAP feeds.
New in this version: - If you have one of the rss-asvisory.php or rss-top-warning.php script that is pre version 2.00
the cache file could conflict with the other script.
If this condition is detected, the script will output: "Advisory Information Unavailable, cache file conflict, view source for details."
If you view the source you will see more details about the cause and how you can fix it (upgrade your other scripts to 2.00 or higher, or rename the $cacheName setting to something other than rss-advisory.txt).
I have modified Ken True's
RSS Top Warning PHP script to a new version 2.0 that is specific to the new beta NWS Atom feeds.
What's New:- Modified to use the Experimental XML/CAP 1.1 Feeds (these alerts are available now and are going to be the standard rss alerts beginning in Dec. 2009. The old alerts are to be phased put.)
- If you install this, one new thing you might notice is that when there is no active warning, it will tell you.
"There are no active watches, warnings or advisories for zone WAZ021." - Three new alerts added in the sorting of the top warning: "Hazardous Weather Outlook(possible future use)", "Evacuation Immediate" and "Extreme Fire Danger".
- New setting: $doLongTitles = true; // adds the zone name to the Alert Title for each alert.
- New setting: $doSilentNoActive = false; // change to true to suppress "There are no active watches, warnings or advisories ...".
- Cache file improvements - cache files are now only written to the server when there is a valid zone selected
- Fixes for handling invalid zones - now checks both input and default zone configuration for both syntax and actual existence of the NOAA zone. If a bogus zone is offered, it does not write any cache files and then displays "Top Warning Information Unavailable, invalid advisory zone selected."
- Better error handling for when the NOAA servers are having problems. View the HTML source for debugging comments.
- Misc. fixes and improvements
Note:This version requires PHP5 and is not backwards compatible with the non-beta feeds.
Your NOAA RSS Advisory PHP and RSS Top Warning scripts will require an upgrade by December of 2009 (you can start using it now if you want).
Try a demo of it on my web site:Included style page:
http://www.642weather.com/weather/top-warning.php?zone=AKZ224 (change the zone as needed to test)
Look here to find zones that have active warnings (hint: Alaska might some active ones now, or look on a national map for an area with warnings.)
http://www.weather.gov/alerts-beta/Download the 2.0 version:http://saratoga-weather.org/atom-top-warning.php?sce=viewPHP carterlake template users need to update to the latest css files here: http://www.642weather.com/weather/scripts/css-theme-switcher.zipThose with home brewed web sites should update the CSS located in the end of the script--------------
If you install this, one new thing you might notice is that when there is no active warning, it will tell you.
"There are no active watches, warnings or advisories for zone WAZ021."
This is to be consistent with the way the RSS Advisory script works.
If for some reason you think it should not print that,there is a setting to turn it off.
$doSilentNoActive = false; // change to true to suppress "There are no active watches, warnings or advisories ..."