WxSim Temperature Forecast Comparison Script

I downloaded newest WU-forecast.php (3.03) and realised afterwards that after upgrading it, forecast comparison script no more showed WU. From cron job log I can see the following:

"

What might cause malfunction here?

http://veikkola-weather.com/wxforecastcomp.php?lang=en#

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

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

or

and the script will likely work for you.

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]) . ‘’ . “\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 :wink:

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 :wink:

Simon.

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

//Timo

Thank You ! Problem solved by changing WU_URL as advised.

//Timo

Trying to implement this script - little unclear on:
“The variables $maxtempyest and $mintempovernight must be made available either through addition to testtags.php or by other means.”

I am using Cumulus as my weather software - any suggestions/tips on what to do - don’t see anything obvious in the Cumulus forums - this file appears to be WD related.

I can get Cumulus to process a file and upload the data for maxtempyesterday and mintempovernight - but when trying the compare script it tells me that
The temperature variables must be initialized by running testtags.php or some other mechanism

Running testtags.php (by calling through a browser) does not help.

Guy

Guy,

Why don’t you attach a copy of the file that Cumulus is processing for you so I can understand better. A link to your site would be good too.

  • Jim

No problem. Here is the file that Cumulus processes (testtags.txt) it generates testtags.php

The scripts are in Index of /forecast

So the compare would be: http://www.wilsonsweather.host-ed.me/forecast/forecast-compare-include.php

The error has changed to configuration file not found - not sure why (I have been playing with root directory location in the scripts, but changed it back to the default).

Guy


testtags.txt (136 Bytes)

Guy,

Please rename the attached include file without the .txt and upload that. Hopefully that will fix the path problem which I think I caused in the file from the .zip.

Then please have Cumulus process the attached testtags.txt file. I’ve added code so we can view the actual output that it gives us by adding ?sce=view to the url.

Thanks. - Jim


testtags.txt (633 Bytes)

forecast-compare-include.php.txt (44.2 KB)

Running testtags.php?sce=view (which is what I think you mean?) simply displays www.wilsonsweather.host-ed.me

Guy

I’d say the next step is to find out where testtags.php actually is because it doesn’t seem to exist at http://www.wilsonsweather.host-ed.me/forecast/testtags.php. Perhaps Cumulus is uploading to the wrong place?

  • Jim

It seems to be there - if you go to http://www.wilsonsweather.host-ed.me/forecast/ its there - and I can see it in the directory when I use my FTP client. Odd.

Guy

That is very odd. When we try to run that script we get redirected to your main page. I don’t know why that would happen, perhaps someone else has an idea?

Why don’t you post that testtags.php here so we can see what it looks like.

  • Jim

Here it is.

The files all sit in html_public/forecast/ tried using that - no difference.

Guy


testtags.php.txt (623 Bytes)

Guy,

Let’s remove the downloader code that I added in testtags.txt to make sure that isn’t somehow causing the redirect. Otherwise I’m out of ideas.

  • Jim

The redirect was happening before the code was added.

Thanks for the help. I do wonder if the way my host structures directories plays a role.

My FTP client sees html_public/forecast/
But using the web file manager for the host shows home/wilsonsw/html_public/forecast/ (something like that). But even if I use those in config etc, makes no difference to the behaviour. I do have another web host I may try at the weekend.

Guy

Guy,

Please let us know how it goes with the new host. I agree that something strange is going on with the present host.

  • Jim

Well… My other host does not support php (with my package). Pondering this.

Guy

Hello,
I have been watching this WxSim comparator script for several days, the truth is that I liked it a lot. I would like to have it on my website.
I am trying to follow the instructions but being Spanish it is a bit difficult for me to follow the instructions in English. I am translating it and I try to understand, but I see that I do not clarify. I have started a couple of times but I do not see any data, only the empty table appears. I think the problem may come from the file testtags.php
Can somebody help me?
In case someone could help me, next I indicate the place where I have the files:

http://meteohila2.esy.es/pronostico%20mxsim/

thanks in advance

regards,