Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

api.weather.gov format changed again??

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
N0BGS
Posts: 214
Joined: Sat Nov 10, 2012 2:26 am
Weather Station: Davis Vantage Pro 2
Operating System: Win7vm,VMWare ESXi 6.5
Location: Hermon, Maine USA
Contact:

api.weather.gov format changed again??

Postby N0BGS » Thu Feb 22, 2018 2:57 am

Hi All:

Anyone one else having trouble getting the NWS point forecasts?

https://www.kpw3.com/wxforecast.php

Seems to have been broken for several days now.

--Kurt
Blitzortung Station 1809

User avatar
saratogaWX
Posts: 889
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: api.weather.gov format changed again??

Postby saratogaWX » Thu Feb 22, 2018 4:15 am

The api hasn’t changed, just the data loading to the api server has become more unreliable.

Download https://Saratoga-weather.org/advforecas ... p?sce=view as advforecast2.php and replace your V5 script with the old (but still working) V4.02 version.

User avatar
N0BGS
Posts: 214
Joined: Sat Nov 10, 2012 2:26 am
Weather Station: Davis Vantage Pro 2
Operating System: Win7vm,VMWare ESXi 6.5
Location: Hermon, Maine USA
Contact:

Re: api.weather.gov format changed again??

Postby N0BGS » Thu Feb 22, 2018 5:22 am

Thanks, Ken but apparently it's unhappy with line 699 in ver 4.02 PHP7 thing perhaps?

"Warning: strpos(): Offset not contained in string in /var/www/html/advforecast2.php on line 699"

Line 699:

Code: Select all

$start = strpos($html, '<td colspan="2" valign="top" align="left">',$startgrab+1); // need second one

--K
Blitzortung Station 1809

User avatar
N0BGS
Posts: 214
Joined: Sat Nov 10, 2012 2:26 am
Weather Station: Davis Vantage Pro 2
Operating System: Win7vm,VMWare ESXi 6.5
Location: Hermon, Maine USA
Contact:

Re: api.weather.gov format changed again??

Postby N0BGS » Thu Feb 22, 2018 5:37 am

OK, my mistake. :roll:

The script is making HTTP calls from my SSL-enabled site. I changed the appropriate lines in the script from http to https and all seems to be well.

Thanks again.

--Kurt
Blitzortung Station 1809


Return to “Saratoga Templates”

Who is online

Users browsing this forum: No registered users and 2 guests