Author Topic: NWS Text products  (Read 759 times)

0 Members and 1 Guest are viewing this topic.

Offline tshattuck

  • Forecaster
  • *****
  • Posts: 337
    • Your Local Weather - Clay, NY
NWS Text products
« on: March 02, 2018, 11:56:21 AM »
Hello:
I need some help with some php scripts. I have links on my web site for:
a. NWS Rain & Snow Reports
b. NWS Storm Reports
c. NWS Marine Forecast
d. NWS Recreational Forecasts

The php script no longer works as the NWS has switched their URLs from HTTP to HTTPS.  I tried changing the file name in the script put it didn't work there must be some additional changes required. How do I update the php script to address this change?

Example: http://yourlocalweather-clay-ny.com/wxrain-snow-reports.php
ex: rain-snow reports.php

Thanks

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: NWS Text products
« Reply #1 on: March 02, 2018, 12:33:01 PM »
Hi Tom,

Here is a list of direct URL's for your products:

http://w1.weather.gov/data/BGM/PNSBGM - Rain/Snow Report

http://w1.weather.gov/data/BGM/RECBGM - Recreational Forecast

http://w1.weather.gov/data/BUF/NSHBUF - Marine Forecast

http://w1.weather.gov/data/BGM/LSRBGM - Storm Report


John
GR2AE, GR3, Cumulus

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NWS Text products
« Reply #2 on: March 02, 2018, 12:35:23 PM »
That page, and likely the others are using forecast-discussion.php V1.04 31-Jul-2012.

I've updated the basic script to V1.06 available here.  Use the URLs posted by John in the script (and change the cache filenames) and you should be set for when that server goes HTTPS also.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tshattuck

  • Forecaster
  • *****
  • Posts: 337
    • Your Local Weather - Clay, NY
Re: NWS Text products
« Reply #3 on: March 02, 2018, 03:14:52 PM »
Ken:
I found the updated script v1.06 earlier but wasn't sure how to modify for my web pages. I figured it out after a little trial and error.  :grin:
My web pages are now working correctly.

Thanks