Files
inverter/weather.php

7 lines
269 B
PHP

#!/usr/bin/php
<?php
require_once 'wunderground.php';
define('STATION', 'INOORDHO4');
$aData = wunderground('conditions', sprintf('pws:%s', STATION));
echo $fTemperature = isset($aData['current_observation']['temp_c']) ? $aData['current_observation']['temp_c'] : null;