$fileopen, CURLOPT_TIMEOUT => 10, CURLOPT_URL => 'https://raw.githubusercontent.com/weather34/Meteobridge-Weather34-Template/master/settings1.default.php' ); $ch = curl_init(); curl_setopt_array($ch, $options); curl_exec($ch); curl_close($ch); $fstat = fstat($fileopen); fclose($fileopen); if (!file_exists($filename) || $fstat['size'] < 100) { echo ($filename . " did not download properly, please visit https://raw.githubusercontent.com/lightmaster/Meteobridge-Weather34-Template/master/settings1.default.php, right click anywhere on the page and choose to save the file. Then copy the file into the root of your website (where you downloaded the website files to on your server).
"); die(); } } } function loadSettings($file) { if (basename($file) != 'settings1.default.php' && !file_exists($file)) { return []; } else if (basename($file) == 'settings1.default.php' && filesize($file) < 100) { downloadfromgit($file); } require $file; unset($file); return get_defined_vars(); } $s1d = loadSettings('./settings1.default.php'); $s1 = loadSettings('./settings1.php'); $check = array_diff_key($s1d, $s1); if (!empty($check)) { //check if dir is writable if (!is_writable(".")) { echo ("

Unable to write to the website's folder. Make sure the root of the website is writable by your webserver.
If you're using Apache on linux, Apache should be running as user 'www-data' and group 'www-data'. If so, run these commands or adjust them for Apache's user:group

find . -type d -exec sudo chown www-data:www-data {} \; -exec sudo chmod 2775 {} \;

and

find . -type f -exec sudo chown www-data:www-data {} \; -exec sudo chmod 664 {} \;

from within the root of your website's folder, probably located in '/var/www/example.com/html/pws.'


or, do yourself a huge favor and navigate into your 'html' folder and use these 3 commands to automatically set the permissions on all files and folders created inside it:

chmod g+s .

setfacl -d -m g::rwx .

setfacl -d -m o::rx .

"); die(); } $s1 = array_merge($s1d, $s1); $code = ' $value) { /// ${var} = "{value}";\n $code .= '$' . $var . ' = ' . var_export($value, true) . ";\n"; } file_put_contents('./settings1.php', $code); } #################################################################################################### # HOME WEATHER STATION TEMPLATE by BRIAN UNDERDOWN 2017-2018-2019 # # CREATED FOR HOMEWEATHERSTATION TEMPLATE at # # https://weather34.com/homeweatherstation/index.html # # WEATHER STATION TEMPLATE 2017-2018-2019 Meteobridge. # # Weatherflow Meteobridge Version April 2019 # # https://github.com/lightmaster/Weather34-Weatherflow # #################################################################################################### //original weather34 script original css/svg/php by weather34 2015-2019 clearly marked as original by weather34// include_once('livedata.php');include_once('common.php');include_once('settings1.php'); date_default_timezone_set($TZ);?> <?php echo $stationlocation; ?> Home Weather Station
(°)

'. $chartinfo. " Daily Forecast ";}?> '. $chartinfo. " Daily Forecast ";}?>  '. $chartinfo. " Hourly Forecast";}?>
(°)

| ",$weather["wind_units"];?>)
",$weather["barometer_units"]; ?>)

".$weather["rain_units"]?>)
'. $webcamicon. ' Live Webcam '. $chartinfo. ' Indoor Guide '. $chartinfo. ' Moon Info ';} if ($position12=='airqualitymodule.php') {echo ' '. $chartinfo. " Air Quality | Cloudbase ";} if ($position12=='weather34uvsolar.php') {echo ' '. $chartinfo. " UV Guide ";} if ($position12=='weather34uvsolar.php') {echo '  '. $chartinfo. " UV Almanac ";} if ($position12=='weather34uvsolar.php') {echo ' '. $chartinfo. " Solar Almanac ";} if ($position12=='solaruvds.php') {echo ' '. $chartinfo. " UV Guide ";} if ($position12=='solaruvds.php') {echo ' '. $chartinfo. " Solar Almanac ";} if ($position12=='solaruvwu.php') {echo ' '. $chartinfo. " UV Guide ";} if ($position12=='solaruvwu.php') {echo ' '. $chartinfo. " Solar Almanac ";} if ($position12=='solaruvwu.php') {echo '  '. $menucharticonpage. " Solar chart ";} if ($position12=='eq.php') {echo ' '. $chartinfo. " Worldwide Earthquakes ";}?>
'. $webcamicon. ' Live Webcam '. $chartinfo. ' Indoor Guide '. $chartinfo. ' Moon Info ';} if ($positionlastmodule=='airqualitymodule.php') {echo ' '. $chartinfo. " Air Quality | Cloudbase ";} if ($positionlastmodule=='weather34uvsolar.php') {echo ' '. $chartinfo. " UV Guide ";} if ($positionlastmodule=='weather34uvsolar.php') {echo '  '. $chartinfo. " UV Almanac ";} if ($positionlastmodule=='weather34uvsolar.php') {echo ' '. $chartinfo. " Solar Almanac ";} if ($positionlastmodule=='solaruvds.php') {echo ' '. $chartinfo. " UV Guide ";} if ($positionlastmodule=='solaruvds.php') {echo ' '. $chartinfo. " Solar Almanac ";} if ($positionlastmodule=='solaruvwu.php') {echo ' '. $chartinfo. " UV Guide ";} if ($positionlastmodule=='solaruvwu.php') {echo ' '. $chartinfo. " Solar Almanac ";} if ($positionlastmodule=='solaruvwu.php') {echo '  ' .$menucharticonpage. " Solar chart ";} if ($positionlastmodule=='eq.php') {echo ' '. $chartinfo. " Worldwide Earthquakes ";} if ($positionlastmodule=='airqualitymodule.php') {echo ''. $chartinfo. " Worldwide Earthquakes ";}?>
';} else if ($weatherhardware== "Davis Envoy8x"){echo 'Davis Instruments-Meteobridge';} else if ($davis=="Yes"){echo 'Davis Instruments-Meteobridge';}else if ($weatherhardware=='Weatherflow Air-Sky'){echo 'http://weatherflow.com/';} else if ($weatherhardware== "Ecowitt GW-1000"){echo 'Ecowitt GW-1000-Meteobridge';} else echo '
designed by weather34 2015-'.date('Y').'
';?>
  (-(-",$weather["build"]?>
  Weather Station