Cloud-base.php with php 7??

Anyone have a working copy of Bashewa’s excellent cloud-base.php converted for php 7? Or at least know why it doesnt work in php 7?

latest version here (that I know of ) v 2.1.

https://www.bashewa.com/download-cloud-base.php

I think I fixed it… well I found others that did :slight_smile: Weather-Watch.com - A place for weather watchers to discuss watching the weather

the main issue was 1 line. (about 1243)
$metar[1] = ereg_replace(“[\n\r]+”,‘’,$raw_metar[1]); // strip linefeeds
changed to
$metar[1] = preg_replace(“[\n\r]+”,‘’,$raw_metar[1]); // strip linefeeds

also not sure if was breaking but anytime mktime() with no arguments with time().

I think?? mktime() with arguments still works?? not 100%

attached my version. Note – I changed the graphics directory from the default (just my install), just make sure to run a diff/compare on this to the base file.


cloud-base.php.txt (79.2 KB)