diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -22,6 +22,7 @@ $curtemp = $arr_json['currentTemprature']; $maxtemp[0] = $arr_json['forecastDay']['0']['maxTemp']; $mintemp[0] = $arr_json['forecastDay']['0']['minTemp']; $wind[0] = $arr_json['forecastDay']['0']['windSpeed']; +$winddirection[0] = $arr_json['forecastDay']['0']['windDirection']; $uv[0] = $arr_json['forecastDay']['0']['uvIndex']; $morning[0] = $arr_json['forecastDay']['0']['morningDescripiton']; // Try to... $afternoon[0] = $arr_json['forecastDay']['0']['afternoonDescripiton']; // ...find a... @@ -35,6 +36,7 @@ $winddesc[0] = $arr_json['forecastDay']['0']['windDescription']; $maxtemp[1] = $arr_json['forecastDay']['1']['maxTemp']; $mintemp[1] = $arr_json['forecastDay']['1']['minTemp']; $wind[1] = $arr_json['forecastDay']['1']['windSpeed']; +$winddirection[1] = $arr_json['forecastDay']['1']['windDirection']; $uv[1] = $arr_json['forecastDay']['1']['uvIndex']; $morning[1] = $arr_json['forecastDay']['1']['morningDescripiton']; $afternoon[1] = $arr_json['forecastDay']['1']['afternoonDescripiton']; @@ -52,7 +54,7 @@ if ($timenow >= strtotime($sunset[0])) { $summary[0] = "00:00: $morning[0] 12:00: $afternoon[0] $sunset[0]: $night[0]"; } -echo "<title>Max $maxtemp[0], Min $mintemp[0], Cur $curtemp, UV $uv[0], Wind $wind[0], $summary[0] $frost[0]</title>\n\n"; +echo "<title>Max $maxtemp[0], Min $mintemp[0], Cur $curtemp, UV $uv[0], Wind $wind[0] $winddirection[0], $summary[0] $frost[0]</title>\n\n"; echo "</head>\n\n"; echo "<body>\n\n"; @@ -61,7 +63,7 @@ echo "<p>Forecasts | <a href=\"./graphs.php\">Graphs</a></p>\n\n"; echo "<h2>Today</h2>\n\n"; //echo "<p><em>$valid[0]</em><br><br>\n"; // If a day summary is found, use a sensible time range here -echo "<strong>Max:</strong> $maxtemp[0], <strong>Min:</strong> $mintemp[0], <strong>Current</strong>: $curtemp, <strong>UV Index</strong>: $uv[0], <strong>Wind</strong>: $wind[0]<br><br>\n"; +echo "<strong>Max:</strong> $maxtemp[0], <strong>Min:</strong> $mintemp[0], <strong>Current</strong>: $curtemp, <strong>UV Index</strong>: $uv[0], <strong>Wind</strong>: $wind[0] $winddirection[0]<br><br>\n"; echo "<strong>Morning:</strong> $morning[0]<br><br>\n"; echo "<strong>Afternoon:</strong> $afternoon[0]<br><br>\n"; echo "<strong>Night:</strong> $night[0]<br><br>\n"; @@ -70,7 +72,7 @@ echo "<strong>Wind:</strong> $winddesc[0]<br><br>\n"; echo "<h2>Tomorrow</h2>\n\n"; //echo "<p><em>$valid[1]</em><br><br>\n"; -echo "<strong>Max</strong>: $maxtemp[1], <strong>Min</strong>: $mintemp[1], <strong>UV Index</strong>: $uv[1], <strong>Wind</strong>: $wind[1]<br><br>\n"; +echo "<strong>Max</strong>: $maxtemp[1], <strong>Min</strong>: $mintemp[1], <strong>UV Index</strong>: $uv[1], <strong>Wind</strong>: $wind[1] $winddirection[1]<br><br>\n"; echo "<strong>Morning:</strong> $morning[1]<br><br>\n"; echo "<strong>Afternoon:</strong> $afternoon[1]<br><br>\n"; echo "<strong>Night:</strong> $night[1]<br><br>\n"; |