update php scripts
This commit is contained in:
12
weather.php
12
weather.php
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user