cloudy

Author Topic: Adding PHP Weather Facts to your page  (Read 11478 times)

0 Members and 1 Guest are viewing this topic.

Offline TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,919
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Adding PHP Weather Facts to your page
« on: September 03, 2005, 12:52:12 AM »
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


All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline jhobby

  • Posts: 76
  • Silver Cliff, Colorado, USA
    • Silver Cliff, Colorado Weather
Re: Adding PHP Weather Facts to your page
« Reply #1 on: September 03, 2005, 02:05:38 AM »
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)


Offline drobbins

  • Posts: 1,704
  • Kentucky, USA
    • Cave Country Weather
Re: Adding PHP Weather Facts to your page
« Reply #2 on: June 06, 2010, 06:44:01 PM »
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.
« Last Edit: July 14, 2010, 10:30:58 PM by drobbins »

Offline TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,919
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: Adding PHP Weather Facts to your page
« Reply #3 on: June 28, 2010, 07:17:59 PM »
Wow... reply to a post that was 5 years old.

Thanks for the list...

All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline drobbins

  • Posts: 1,704
  • Kentucky, USA
    • Cave Country Weather
Re: Adding PHP Weather Facts to your page
« Reply #4 on: June 29, 2010, 12:12:14 AM »
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.

Offline tstorm

  • Posts: 375
  • Harpers Ferry, WV
    • Meadowbrook Farm Weather
Re: Adding PHP Weather Facts to your page
« Reply #5 on: June 29, 2010, 10:53:52 PM »
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

Offline drobbins

  • Posts: 1,704
  • Kentucky, USA
    • Cave Country Weather
Re: Adding PHP Weather Facts to your page
« Reply #6 on: June 30, 2010, 12:46:38 AM »
That is the troubles with "facts" - they are always changing.  :roll:

Quote
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

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

Offline drobbins

  • Posts: 1,704
  • Kentucky, USA
    • Cave Country Weather
Re: Adding PHP Weather Facts to your page
« Reply #7 on: July 03, 2010, 12:04:40 AM »
Quote
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?
« Last Edit: July 14, 2010, 10:31:28 PM by drobbins »

Offline Murry Conarroe

  • Posts: 596
  • Decatur, Texas
    • Wildwood Weather
Re: Adding PHP Weather Facts to your page
« Reply #8 on: July 03, 2010, 10:40:46 AM »
Anything else needs updating?

You may want to update the Fujita scale to the Enhanced Fujita scale for tornadoes.
« Last Edit: July 03, 2010, 11:07:00 AM by Murry Conarroe »
Murry

Offline tstorm

  • Posts: 375
  • Harpers Ferry, WV
    • Meadowbrook Farm Weather
Re: Adding PHP Weather Facts to your page
« Reply #9 on: July 03, 2010, 11:48:59 AM »
Well I just checked the NWS webpage again today - And they did update it.

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

As far as hurricanes goes the following is incorrect
strong>Hurricanes</strong><br/>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).  

« Last Edit: July 03, 2010, 11:53:48 AM by tstorm »

Offline Murry Conarroe

  • Posts: 596
  • Decatur, Texas
    • Wildwood Weather
Re: Adding PHP Weather Facts to your page
« Reply #10 on: July 03, 2010, 01:34:25 PM »
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
Murry

Offline drobbins

  • Posts: 1,704
  • Kentucky, USA
    • Cave Country Weather
Re: Adding PHP Weather Facts to your page
« Reply #11 on: July 03, 2010, 01:46:23 PM »
  • 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:
« Last Edit: July 03, 2010, 01:51:31 PM by drobbins »

Offline EastMasonvilleWX

  • Posts: 251
  • Masonville, NY
    • East Masonville Weather
Re: Adding PHP Weather Facts to your page
« Reply #12 on: July 04, 2010, 12:52:43 PM »
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
East Masonville Weather
Upstate New York
http://eastmasonvilleweather.com


Offline sacreysouthern

  • Posts: 224
  • Saline Weather
  • Benton, AR, USA
    • Saline Weather
Re: Adding PHP Weather Facts to your page
« Reply #13 on: July 06, 2010, 11:21:05 PM »
I wish to thank Kevin for the script and drobbins for the list.  Another excellent script from an awesome group of folks.

John Sacrey
GR2AE, GR3, Cumulus, Davis VP2 Pro, CWOP: D2073, WOW, Weatherbug, PWS
Saline Weather on Twitter

Offline ed2kayak

  • CoCoRaHS PA-CD-6, Weather Underground KPAMECHA7, CWOP DW5425
  • Posts: 488
  • Mechanicsburg PA
    • Cumberland Valley Weather
Re: Adding PHP Weather Facts to your page
« Reply #14 on: December 10, 2010, 03:45:38 PM »
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.
http://cvweather.org/wxfacts.php
Ed
CoCoRaHS PA-CD-6,  Weather Underground KPAMECHA7, CWOP DW5425   http://cvweather.org/weather2/


 

cumulus