Re: WU-forecast.php
Posted: Fri 18 May 2018 8:05 pm
I seem to suffer so badly with the WU problem. For weeks now, it is breaking 30+ times a day. I check yours, Simon, and it's working for you. I just don't get it?!
Support forum for Cumulus weather station software
https://cumulus.hosiene.co.uk/
i added a bit of code as I found either my ./cache/WU-forecast-json-0-en.txt would be 0 bytes of incomplete. it still happens from time to time, but is much more stable.Mapantz wrote:I seem to suffer so badly with the WU problem. For weeks now, it is breaking 30+ times a day. I check yours, Simon, and it's working for you. I just don't get it?!
Code: Select all
<?php
$filename = './cache/WU-forecast-json-0-en.txt';
if (file_exists($filename)) {
$zerosize = filesize('./cache/WU-forecast-json-0-en.txt');
if ($zerosize < 23000) {
// if ($zerosize == 0) {
unlink('./cache/WU-forecast-json-0-en.txt');
} }
// WU-forecast.php script by Ken True - webmaster@saratoga-weather.org
//
// Version 1.00 - 02-Sep-2007 - initial release
Thank you Simon. I've added that to the top, let's see how she holds up?!Toxic17 wrote:i added a bit of code as I found either my ./cache/WU-forecast-json-0-en.txt would be 0 bytes of incomplete. it still happens from time to time, but is much more stable.Mapantz wrote:I seem to suffer so badly with the WU problem. For weeks now, it is breaking 30+ times a day. I check yours, Simon, and it's working for you. I just don't get it?!
yep its not perfect, but then again WU is the issue, not our scripts.Mapantz wrote:Quick update. Everything much better. I still get an empty forecast now & then, but instead of 30 times a day, it's just a couple.