summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/index.php b/index.php
index 9835fdd..b9a7707 100644
--- a/index.php
+++ b/index.php
@@ -36,7 +36,7 @@ $afternoon[0] = $arr_json['forecastDay']['0']['afternoonDescripiton']; // ...fin
$night[0] = $arr_json['forecastDay']['0']['nightDescripiton']; // ...day summary
$sunset[0] = $arr_json['forecastDay']['0']['sunSet'];
$frost[0] = $arr_json['forecastDay']['0']['frost'];
-$winddesc[0] = $arr_json['forecastDay']['0']['windDescription'];
+$winddesc[0] = $arr_json['forecastDay']['0']['windDescription']; // Unused for now
// Tomorrow
@@ -55,13 +55,17 @@ $winddesc[1] = $arr_json['forecastDay']['1']['windDescription'];
if ($timenow >= strtotime($sunset[0])) {
$summary[0] = "$sunset[0]: $night[0]";
+ $windperiod = $arr_json['forecastDay']['0']['nightWindDescripiton'];
} else if ($timenow >= strtotime("12:00:00")) {
$summary[0] = "12:00: $afternoon[0] $sunset[0]: $night[0]";
+ $windperiod = $arr_json['forecastDay']['0']['afternoonWindDescripiton'];
} else {
$summary[0] = "00:00: $morning[0] 12:00: $afternoon[0] $sunset[0]: $night[0]";
+ $windperiod = $arr_json['forecastDay']['0']['morningWindDescripiton'];
+
}
-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 "<title>Max $maxtemp[0], Min $mintemp[0], Cur $curtemp, UV $uv[0], Wind $wind[0] $winddirection[0], $summary[0] $frost[0] $windperiod</title>\n\n";
echo "</head>\n\n";
echo "<body>\n\n";
@@ -75,7 +79,7 @@ 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";
echo "<strong>Frost:</strong> $frost[0]<br><br>\n";
-echo "<strong>Wind:</strong> $winddesc[0]<br><br>\n";
+echo "<strong>Wind:</strong> $windperiod<br><br>\n";
echo "<h2>Tomorrow</h2>\n\n";
//echo "<p><em>$valid[1]</em><br><br>\n";