Friday, January 03 2003 @ 03:28 PM EST
Contributed by: anonymous
Views: 1,996
The 7 Day forecast stopped functioning today. It appears the NOAA made a change to the domain where the forecast code is hosted. Apply the following to /weather/index.php to restore the forecast functionality:
Looks like I missed some steps...see these instructions from jhughes:
The changes have also broken the "More Local Wx" and "2-Day History"
Here's what needs to be fixed in index.php
In the function cleanup_html($html)
Find
$html = str_replace( 'obslocal.php?', $wx[sw_site] . 'index.php?goget=obslocal.php&', $html );
$html = str_replace( 'obshistory.php?', $wx[sw_site] . 'index.php?goget=obshistory.php&', $html );
Replace with
$html = str_replace( 'http://www.srh.noaa.gov/obslocal.php?', $wx[site_site] . $wx[sw_file] . '?goget=obslocal.php&', $html );
$html = str_replace( 'http://www.srh.noaa.gov/obshistory.php?', $wx[site_site] . $wx[sw_file] . '?goget=obshistory.php&', $html );
In the goget switch for obslocal and obshistory,
Change the existing URL
$url = 'http://www.crh.noaa.gov/data/forecasts/'
To this
$url = 'http://www.srh.noaa.gov/'
Those changes restore the index.php to full function.
---
Danny @ squatty.com