Adding PHP Weather Facts to your page

I’ve had a number of people ask how I added the weather facts sections to the bottom of many of our weather site pages.

I’ve created a simple page that has the basic information on how I did it.

Basically, it is a php script that is called by any page that needs to display the information. And a flat text file that contains all the facts that we want to use with a delimiter after each one.

When the function is called, the list is shuffled and one entry is randomly sent to the calling routine.

We use something similar for our new Site news section as well…

http://www.tnetweather.com/nb-0003.php


junk131.gif

Good Information!I for one sure enjoy seeing any form of anyones work that is explained out in detail it sure helps in trying to learn how to make a good, interesting web site.

                                          THANK YOU (keep it coming)

I had added this to my site sometime back and it has been working well. I put together a list of about 120 different facts pertaining to the weather, weather terms, astronomy, and recycling. In addition my list also has Kentucky weather events as well as local cave facts that are not in this list. Being as it took some time to put the list together, I thought I would share them.


facts.txt (24.9 KB)

Wow… reply to a post that was 5 years old.

Thanks for the list…

I wanted to add more facts to my collection, so I did a search for this thread hoping that someone had posted some. When I found that there were no facts in this thread, I posted what I had.

Thanks for the script.

Nice list of facts. Doing a quick scan I found a couple of outdated ones. For a severe thunderstorm the hail size criteria is now 1" instead of 3/4" . Also, some of the statistical facts on hurricanes are not correct. A good source for some hurricane facts is on NHC’s website at http://www.nhc.noaa.gov/pdf/NWS-TPC-5.pdf

That is the troubles with “facts” - they are always changing. :roll:

For a severe thunderstorm the hail size criteria is now 1" instead of 3/4" .
Well the NWS needs to update their webpage then. [http://www.crh.noaa.gov/lmk/?n=severe_wx_terms](http://www.crh.noaa.gov/lmk/?n=severe_wx_terms)

Thanks for the NOAA link, I will check it out.

For a severe thunderstorm the hail size criteria is now 1" instead of 3/4" .

Well I just checked the NWS webpage again today - And they did update it. :lol:
Anything else needs updating?

You may want to update the Fujita scale to the Enhanced Fujita scale for tornadoes.

That’s because I emailed them and let them know of the error

As far as hurricanes goes the following is incorrect
strong>Hurricanes
The average number of hurricanes for the past 20 years has been 10. The largest number of hurricanes was 21 in 1933. Only one hurricane was recorded in 1890. On the average, only two typical storms each year bring hurricane force to the United States coastal areas.:::

If you go to http://www.nhc.noaa.gov/pdf/NWS-TPC-5.pd you will see on page 13 Table 7 it gives averages for # tropical storms, hurricanes, and major hurricanes for various time periods. 10 is to high for the last 20 years from 1987 to 2006. For the largest number of hurricanes in a given year go to table 8a, which shows the max number of hurricanes was 15 in 2005. Not sure where the source of 1 hurricane in 1890 came from. Table 8a has info on min activity. For the last sentence of the fact I believe it is incorrect. You would be better off saying that on average there are 5 hurricanes every 3 years which make landfall somewhere along the U.S. Gulf or Atlantic coast (page 11).

It looks like the Wind Chill fact needs to be updated with the current formula.
http://www.usatoday.com/weather/resources/basics/windchill/wind-chill-formulas.htm

  • I just deleted the hurricane “fact” in question all together. :wink: I agree that it is incorrect.
  • The Fujita scale has been updated to the Enhanced Fujita scale.
  • Wind Chill formula is updated.

I should have added a disclaimer to this list. On my site I have this listed as “Fun Facts” - meaning that they are not to be taken too seriously. They were put together from many “facts” lists that were found by Googling and lists from the NWS. Each “fact” was not researched and verified. Please use at your own risk.

I do appreciate the corrections. :salute:


facts.txt (25 KB)

Wow guys this if quite the list. I went ahead and added to the bottom of my pages.

Thanks for the script and the facts,
-Dennis

I wish to thank Kevin for the script and drobbins for the list. Another excellent script from an awesome group of folks.

John Sacrey

Yes, thank you, from me as well. I just stumbled across, and added as well. On its on page for now.

And I’ll add my thanks as well. Good stuff!

BTW, where are y’all getting those nifty little circular ‘avatars’ I am seeing more of - especially drobbins’ animated one?

Thanks.

Graphics Request…
http://discourse.weather-watch.com/t/7103

Or more specifically…
http://discourse.weather-watch.com/t/26995

Thanks, Kevin. Movin’ over there.

BTW - incredible work!

Thanks… there are others that have been doing round avatars as well.