advforecast2.php help needed

I’ve been struggling to get my forecast to display correctly. I updated the advforecast2.php to the latest and its displaying the zone forecast but I’m getting the error “The detailed point forecast weather data is not currently available.The zone forecast data for MAZ012 (Southern Worcester) will be displayed until the point forecast data is again available.”

I’ve gone into view source to try and understand whats going on but no success. Also none of my other forecasts for towns in my pull down menu are working. I clearly need to change something.

Please check it out at

In my Settings.php
// use “Zone|Location|Point-printableURL”, as entries … first one will be the default forecast.
“MAZ012|Auburn MA|”,
“KHYA|Dennis MA|”,
“KIZG|North Conway NH|”,
“KMWN|Mount Washington NH|”,
“KAQW|Savoy MA|”,

might want to read this thread;topicseen
i am having issues also in vancouver wa.
apparently its a nws issue.

advforecast2.php V5.x uses the “beta” associated with the site. Yes, the API is sometimes very flakey. Sigh.

For those not wanting to experience the API issues with the NWS beta site, please download

and replace your V5 copy. It’s old, but still works with the current site (but won’t when(if?) they switch to the new website design) – their changover has been indefinitely delayed (at 1 year and counting now).

In the earlier thread you said that the fcstscript had to be changed if reverting back to

$SITE[‘fcstscript’] = ‘advforecast-json.php’; // USA-only NWS Forecast script
Code: [Select]
$SITE[‘fcstscript’] = ‘advforecast2.php’; // USA-only NWS Forecast script

After I updated to 5.04, I still have advforecast2.php in settings.
Never saw the advforecast-json.php.
Did I miss something?


Your advforecast2.php is the V5.02 JSON version. No need to change your Settings.php, just download the script from and save it as advforecast2.php, then upload to replace your copy.

Thanks Ken.

Thanks Ken. All set now.

Appears NWS has managed to break 4.02 as well. Two sites, different sides of the country, both broken. Sigh.

Yep, mine is broken too :roll:

and mine as well

There’s a thread on wxforum with a possible work around and the suggestion is that the NWS has switched to the new system :dontknow:

Grrr. They changed the site to force HTTPS.

So… I’ve updated the OLD advforecast2.php to V4.03 and switched to curl for doing the access.

Use: to have the OLD script work again.

Dang 'em

Thanks Ken, back in business here :smiley:

Same here. Thanks Ken !!!

Also… if you’re using the forecast-discussion.php script, it has been updated to V1.06 too (for https to

Hi Ken,

I just put 4.03 in place to deal with the changes. I changed my NOAAZone and fileName to what I was using previously, but the forecast keeps coming up for Saratoga. Looks like it’s grabbing it from the NWSforecasts array. I’ve tried a few things, but can’t get it to use my location.

This is what I’m using for the forecast link:

I see your link specifies the city name. Will the latest version not work with the lat/lon?

More busy… I’ve updated the advforecast2.php (JSON Version) to V5.05 and it has extra code to better handle redirects and failover to zone forecasts when needed.

It really irritates me that they’ve set the API for a point forecast to ALWAYS return a 301 to a gridpoint forecast instead of just returning the JSON requested. Grrrr… I’ve enabled curl to follow one redirect, set the timeout longer (6 seconds) and handle the muddled headers returning from a curl-fetch-with-redirect. Also set the point forecast life to be 18 hrs (instead of 12) to be ‘stale’ and fail over to the zone forecast.

Hopefully these mods will make our sites more stable while the is still having flaky responses.

I’ve also decided to dual post the V4.04 and V5.05 versions of the script on the script page so there will be a durable link to the old (page scraper) script while the cutover to the new is still pending.

Template users can pick up the updates at update tool page with a query of Base-USA, Plugin-*, 27-Feb-2018

I think I’ll rest up a bit… it’s been a busy day for NWS-related changes.

Is it still possible to get the 2-line icon display? I am not familiar with what changes they made as I never had a problem with my forecasts here but I notice the new code defaults to 1 line and I am not sure where/what to change.

The advforecast2.php V4.x script only has 1 line of icons since it is a page-scraper of the point-printable forecast.

The advforecas2.php V5.x has the two lines of icons available since it uses JSON from (and they produce more icons).

If you want the two lines, you’ll need to use the V5.x script…