Author Topic: Saratoga: USA Extremes  (Read 753 times)

0 Members and 1 Guest are viewing this topic.

Offline lakelaurashawn

  • Member
  • *
  • Posts: 4
Saratoga: USA Extremes
« on: May 17, 2025, 08:24:18 PM »
Good Afternoon - in my series of site updates, I’d like to update the extreme section of my home page, which is all blank.  My site can be found here:  http://www.lakelaurashawn.net and the information (missing) is on the left side

Looking at the current usaextremes.php Version 2.01, here is the code which appears to grab the data from weather underground.  Testing the link, it has an error 404 page not found. 

//SETTINGS START HERE////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Site to Parse
$url2 = "http://www.wunderground.com/climate/extremes.asp";
// Set the time zone
$ourTZ = 'America/New_York';
// Name of cache file  --  This file must be set to CHMOD-666
$cacheFile2 = "usaextremesCache.php"; 
// Age of cache file before re-fetch caching time, in seconds (3600 = 1 hour)
$cache_life = '3600';
/////////////////////////////////////////////////////////////////////////////
//END SETTINGS/////////////////////////////////////////////////////////////// 

What should the link be to grab the weather extremes? 

Thanks in Advance
Lake

Offline R.Sidetrack

  • Senior Contributor
  • ****
  • Posts: 298
Re: Saratoga: USA Extremes
« Reply #1 on: May 17, 2025, 09:11:54 PM »
I don't know the answers to your questions, but Weather Underground is in the middle of revising their site at this point. See this current thread: https://www.wxforum.net/index.php?topic=48460.0

Changes made now might need to redone, depending on what the final design turns out to be.
Graham

--- Variety of 'discrete' Ecowitt devices; CumulusMX on Raspberry Pi4 ---

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9717
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga: USA Extremes
« Reply #2 on: May 17, 2025, 09:59:47 PM »
You should use the replacement script from https://saratoga-weather.org/scripts-NWSmisc.php#NWSEXTR

The Wunderground script hasn't worked for quite a while.
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 Vasco

  • Forecaster
  • *****
  • Posts: 678
    • PWS
Re: Saratoga: USA Extremes
« Reply #3 on: May 18, 2025, 06:06:18 AM »
Good Afternoon - in my series of site updates, I’d like to update the extreme section of my home page, which is all blank.  My site can be found here:  http://www.lakelaurashawn.net and the information (missing) is on the left side

That site dates from 2015 and is running on PHP 5.4.45, according to check-fetch-times.php?show=versions

Would it not be better to update the whole thing first?
« Last Edit: May 18, 2025, 06:22:57 AM by Vasco »
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline lakelaurashawn

  • Member
  • *
  • Posts: 4
Re: Saratoga: USA Extremes
« Reply #4 on: May 18, 2025, 12:22:11 PM »
Morning - Thanks for the suggestion to update the site first. 

In that path, do I update to the latest version of PHP then apply the updates or apply updates then update to the latest version of PHP?

Reviewing the updates available via this link https://saratoga-weather.org/wxtemplates/updates.php#updates there are what appears to be 453 updates! 

Nearly all of the updates have a note indicating "Recommend: Replace current copy with updated copy." For those, do I just replace and go on?  Will they work with my current version of 5.4.x PHP?

There are a handful of updates with a note "Recommend: Replace current copy with updated copy after customization."  Assuming those are the ones where I take information from the current script and apply it to the new script? 

Again, thanks in advance.
Lake

Offline Vasco

  • Forecaster
  • *****
  • Posts: 678
    • PWS
Re: Saratoga: USA Extremes
« Reply #5 on: May 18, 2025, 01:28:56 PM »
In that path, do I update to the latest version of PHP then apply the updates or apply updates then update to the latest version of PHP?
Your current scripts won't work with PHP 8 so I think the latter. . . and " 'twere well it were done quickly"   :-)
Quote
Nearly all of the updates have a note indicating "Recommend: Replace current copy with updated copy." For those, do I just replace and go on?  Will they work with my current version of 5.4.x PHP?
I think so. . .
Quote
There are a handful of updates with a note "Recommend: Replace current copy with updated copy after customization."  Assuming those are the ones where I take information from the current script and apply it to the new script? 
Yes. Is there not a readme file with the updates?

I use DiffMerge from SourceGear to compare new versions with customised scripts, side by side, and transfer any customisation. Others swear by WinMerge. . .
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9717
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga: USA Extremes
« Reply #6 on: May 18, 2025, 03:45:35 PM »
Morning - Thanks for the suggestion to update the site first. 

In that path, do I update to the latest version of PHP then apply the updates or apply updates then update to the latest version of PHP?

Reviewing the updates available via this link https://saratoga-weather.org/wxtemplates/updates.php#updates there are what appears to be 453 updates! 

Nearly all of the updates have a note indicating "Recommend: Replace current copy with updated copy." For those, do I just replace and go on?  Will they work with my current version of 5.4.x PHP?

There are a handful of updates with a note "Recommend: Replace current copy with updated copy after customization."  Assuming those are the ones where I take information from the current script and apply it to the new script? 

Again, thanks in advance.
Lake

Do the site script updates first .. the script updates will work fine with PHP5, but your un-updated site will likely fail with PHP 8.

The "Replace current copy with updated copy" scripts are all safe to do just that.  Their configuration is kept in Settings.php.

The "Replace current copy with updated copy after customization" means copy settings from the old script to the new script then upload.

Yes, there's a README file included with each file notated with how to replace it using one of the two above methods.

After all the scripts are updated on your site, then you can do the PHP update to PHP 8
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