Trouble with NWS forecasts

My forecasts haven’t been updating for a while now. So I did some searching here today and ended up updating my advforecast2 script. I did add my zone and printable link.
Now pretty much none of my page will load and it shows the error

" Parse error: syntax error, unexpected ‘’ (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /home/content/69/6842969/html/weather/advforecast2.php on line 152 "

Line 152 is " if (isset($SITE[‘NWSforecasts’])) {$NWSforecasts = $SITE[‘NWSforecasts’]; } " and I just can’t figure out what the problem is.

Any advice would be greatly appreciated.

http://wessb.com/weather/index.php

In your Settings.php you have

$SITE['fcsturlNWS']        = "https://forecast.weather.gov/MapClick.php?lat=36.1893&lon=-76.4657&unit=0&lg=english&FcstType=text&TextType=2";

and

$SITE['NWSforecasts']   = array( // for the advforecast2.php V3.xx version script
// use "Zone|Location|Point-printableURL",  as entries .. first one will be the default forecast.
  "NCZ032|Hertford|https://forecast.weather.gov/MapClick.php?zoneid=NCZ032&FcstType=text&TextType=2",

and the latter should be

$SITE['NWSforecasts']   = array( // for the advforecast2.php V3.xx version script
// use "Zone|Location|Point-printableURL",  as entries .. first one will be the default forecast.
  "NCZ032|Hertford|https://forecast.weather.gov/MapClick.php?lat=36.1893&lon=-76.4657&unit=0&lg=english&FcstType=text&TextType=2",

You’ve likely made changes to advforecast2.php (which aren’t needed when you use it in the Saratoga template), and you’ve left off a ; or ’ or " from a previous statement. I’d suggest you just download a fresh copy of advforecast2.php (either version as you like) and replace your copy after changing the Settings.php as shown above. advforecast2.php automatically gets the required customization from $SITE variables in Settings.php, so you never need to configure it inside the script itself.

And… while you’re at it, use http://www.wessb.com/weather/check-fetch-times.php?show=versions – you have a bunch of scripts that should be updated :slight_smile:

Thank You so much Ken, those were the problems. I will certainly get on updating the remainder of the scripts in the very near future, but not being one that writes much if any php code it can get a little overwhelming sometimes.
Again…many Thanks