WUForecast.php problem with new WU website

Ken,
Many thanks for your swift response from me as well.

Chris

Ken
thank you very much for your quick response to the problem :lol: :lol:
emilio

Hi Ken, thanks once again for your assistance.

I’ve sent them some corrections several times, all I got back is silence.

Many thanks Ken for your speedy fix for the problem, back up and running now!

Cheers,
Ian

Thanks Ken,
Wasn’t just my eyes then, had one of them lasered today, perhaps that is why I spotted the missing data. :roll:
One thing I did notice when I looked on WU was that another PWS had appeared on the Island, a Davis no less, atop one of the shopping malls. Unfortunately no website only WU data. So now up to 5 known PWS, 3 using Davis and 2 using WD. An improvement.

You all are quite welcome! Glad I could remedy the situation in about 1 day :slight_smile:

Best regards,
Ken

Well done, dumped it in the site deleted the cache refreshed the page and it was working.

Never simpiler.

Ken, thank you very much for the speedy update, much appreciated.

Shame about the imperial units though.

Thanks
Liam

OK, I’m obviously doing something wrong here… :oops:

I’ve copied Kens new WU script, and it does say in there:

// The script DOES NOT work for locations in the USA, US territories or Canada. There are
// other scripts for NOAA and EC forecasts for you to use instead of this script.

so I have the correct one for the UK, but on my forecasts page it says:

[b]Sorry… this country forecast can not be processed by this script.

Locations in the United States and territories should use the carterlake NOAA script.

Locations in Canada should use the Environment Canada forecast script.
WeatherUnderground : Wyton RAF
[/b]

(The word forecast is a hyperlink which takes me to the correct Wunderground page, my local RAF station)

Where have I gone wrong…?? :?

Hi Daryll,

The messages you cited are the default ‘I can’t parse the page’ messages which were usually caused by the layout and contents for USA and Canada locations being quite different from the expected international format.

What’s the URL you are using in your WU-forecast.php script … I’ll take a look.

Best regards,
Ken

Thanks Ken…

My forecast page is http://www.jizzyland.co.uk/weather/wxforecast.php

Daryll.

One question

That mean that if i live in USA or Canada, i can’t anymore have this scripts working ?

Daryll,
You’ll need to change your URL from Local Weather Forecast, News and Conditions | Weather Underground to Local Weather Forecast, News and Conditions | Weather Underground … the WU-forecast.php script now only handles their new website format and not the old format.

Jean-Robert,
The WU-forecast.php script never worked for forecast locations in the US or Canada due to the differences in forecast format on the Classic and New Wunderground websites. It can be used for any non-US/non-Canada forecast location. If you (in Quebec) want to include a forecast for London, UK or Paris, France that would work fine… just not for any forecast for locations inside the US or Canada.

I’ve done a major rework of how the script determines to use a day or a night icon so the multilingual forecast period names now work correctly. I’m still a bit shocked that they don’t automatically include the night icon for the nighttime forecasts, but oh well…

You can update your WU-forecast.php script from Saratoga-Weather.org - Scripts - WeatherUnderground Forecast
Please remember to use the appropriate version based on your website implementation … one script is for the old WD/AJAX/PHP-World (or standalone), and the other is for the WD/AJAX/PHP World-ML and new Base-World templates.

Best regards,
Ken

Thanks Ken, presumably you meant in the settings.php file… yes, I’d added “classic” following the comment earlier in this thread, then forgot to change it back… :oops:

I took the “classic” out but still didn’t get anything… waited a couple of hours to see if it updated, still nothing, then looked back at this thread and realised I’d missed out the “www”… DO’H…!

All working fine now… :smiley:

Hello Ken,

I have download the new ML WU-forecast.php and modified to my local Station (comment out)
http://dutch.wunderground.com/global/stations/06270.html

Then I get a
Fatal error: Call to undefined function: stripos() in /home/meteohuins.nl/public_html/php/WU-forecast.php on line 473

Are you sure you have php 5 ?

Yes, stripos() is in PHP5+, not in PHP4 … time to upgrade your site to PHP5 :slight_smile:

Ahaaaa, thats the point :? Yes it’s working now :lol:

Thanks to you all

Hi

Not sure if this is a new problem or not - the new script was working perfectly for a 7 day forecast (and thanks so much for fixing that Ken, much appreciated!) but today i find that my forecast page is only showing a 1 day forecast - has something changed??

My site is at: www.southuist-weather.info/forecast.php

Be glad of any help!
Thanks

Yvonne

Hi Yvonne,
It looks your cache had the WU page with missing forecasts. I did http://www.southuist-weather.info/forecast.php?force=1 and it’s showing them all now :slight_smile:

Best Regards,
Ken