update php scripts

This commit is contained in:
2019-11-23 15:39:04 +00:00
parent f402a13f41
commit 6f559694b8
5 changed files with 87 additions and 11 deletions

View File

@@ -1,7 +1,11 @@
#!/usr/bin/php
<?php
require_once 'wunderground.php';
// require_once 'wunderground.php';
require_once 'openweathermap.php';
define('STATION', 'INOORDHO104');
$aData = wunderground('conditions', sprintf('pws:%s', STATION));
echo $fTemperature = isset($aData['current_observation']['temp_c']) ? $aData['current_observation']['temp_c'] : null;
// define('STATION', 'INHASSUM4');
define('CITY', 2745978);
// $aData = wunderground('conditions', sprintf('pws:%s', STATION));
$aData = openweathermap(CITY);
echo $fTemperature = isset($aData['main']['temp']) ? floatval($aData['main']['temp']) - 273.15 : null;