Wind statistics

Index lists $num_stations active station(s)!

"); foreach($index as $s) { $updated = date("Y-m-d H:i", $s->lastupdate); $latest_url = "$api/$s->id/latest.json"; $latest = json_fetch($latest_url); if ($latest === FALSE) die("Failed to fetch latest sample for station $s->id"); echo("
"); echo("

$s->friendlyname (updated every $s->pollrate second)

"); echo(""); $history_url = "$api/$s->id/history.json"; $history = json_fetch($history_url); if ($history === FALSE) die("Failed to fetch history for station $s->id"); $samplecount = count($history); echo("

History (10 last samples)

"); echo(""); } ?>