cloudy cloudy

Author Topic: WxSim Temperature Forecast Comparison Script  (Read 156897 times)

0 Members and 1 Guest are viewing this topic.

Online jmcmurry

  • Jim McMurry
  • Posts: 2,785
  • Mauston, WI, USA
  • OS/Browser:
  • Win XP
  • Firefox 51.0
    • Juneau County Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #1125 on: June 16, 2017, 09:21:01 AM »
T-man,

Those errors appear to be from the http://veikkola-weather.com/WU-forecast.php script, so start looking there.  Did you update that too?

- Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Offline saratogaWX

  • Global Moderator
  • Posts: 5,619
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
  • OS/Browser:
  • Win NT 10.0
  • Firefox 54.0
    • Saratoga Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #1126 on: June 16, 2017, 03:50:58 PM »
The issue with WU-forecast.php is the URL you are using for the conditions can't be parsed for use with the api.wunderground.com
Quote
<!-- WU-forecast.php (ML) Version 3.03 - 22-Feb-2017 on PHP 5.6.30 -->
<!-- WU_API Raw URL='https://www.wunderground.com/personal-weather-station/dashboard?ID=IETELSUO12#history' -->
<!-- loading from . -->
<!-- curl fetching '' -->
<!-- Error: <url> malformed -->
<!-- HTTP stats:  RC=0 dest= port=0 (from sce=)
      Times: dns=0.000 conn=0.000 pxfer=0.000 total=0.000 secs -->
<!-- headers:

 -->
<!-- RC=, bytes=0 -->
<!-- saved cache to ./WU-forecast-json-0-en.txt (0 bytes) -->
<!-- using charsetInput='UTF-8' charsetOutput='ISO-8859-1' doIconv='1' doRTL='' -->
<!-- processing JSON entries for forecast -->
<!-- rawJSON size is 0 bytes -->
<!-- WU_prepareJSON: Success. Valid UTF-8. -->
<!-- json_decode returns  - No errors -->

Change the URL to

https://www.wunderground.com/cgi-bin/findweather/hdfForecast?query=60.266%2C24.449&sp=IETELSUO12

or

https://www.wunderground.com/q/zmw:00000.54.02758

 and the script will likely work for you.
« Last Edit: June 16, 2017, 03:52:47 PM by saratogaWX »
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline Leavening Weather Station

  • Posts: 235
  • Leavening Weather Station (NYORKS:UK)
  • Leavening, North Yorkshire, UK
  • OS/Browser:
  • Mac OS X 10.11.6
  • Safari 10.1.1
    • Leavening Weather Station
Re: WxSim Temperature Forecast Comparison Script
« Reply #1127 on: June 19, 2017, 09:05:29 AM »
Greetings!

It's very likely that I'm using an ancient version of Jim's brilliant FART script but I noticed today that I have some errors building up in my log :-

[19-Jun-2017 09:55:28 Europe/London] PHP Warning:  date() expects parameter 2 to be long, string given in /home/ruralter/public_html/leavening.org/wxsim/forecast-compare-include.php on line 926

Line 926 contains this :-
echo '>' . date($FCdatestr,$entry[0]) . '</option>' . "\n";

My ability in php is very limited and I can't see what's causing this. I am assuming its something blindly obvious to anyone who knows what they're talking about.

Any ideas ?

Many thanks & kind regards from the UK which is pushing 30C for a change, hotter than Barbados yesterday apparently ;-)

The script lives here :- http://www.leavening.org/wxsim/fartindex.php

I also see that the Nordic comparison always has high and low as the same temperature. Which makes WXSim always win ;-)

Simon.
Weather Information from Leavening, Ryedale, North Yorkshire, UK


Offline T-man

  • Posts: 178
  • Finland
  • OS/Browser:
  • iOS 10.3.2
  • Safari 10.0
    • Sää Tuulensuunkaari
Re: WxSim Temperature Forecast Comparison Script
« Reply #1128 on: June 19, 2017, 10:01:44 AM »
The issue with WU-forecast.php is the URL you are using for the conditions can't be parsed for use with the api.wunderground.com
Change the URL to

https://www.wunderground.com/cgi-bin/findweather/hdfForecast?query=60.266%2C24.449&sp=IETELSUO12

or

https://www.wunderground.com/q/zmw:00000.54.02758

 and the script will likely work for you.

Thank you. I'll give that a try today.

//Timo

Offline T-man

  • Posts: 178
  • Finland
  • OS/Browser:
  • Mac OS X 10.12.5
  • Safari 10.1.1
    • Sää Tuulensuunkaari
Re: WxSim Temperature Forecast Comparison Script
« Reply #1129 on: June 19, 2017, 01:40:49 PM »
Thank You ! Problem solved by changing WU_URL as advised.

//Timo