summaryrefslogtreecommitdiff
path: root/graphs.php
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2017-06-20 21:58:46 +0100
committerLuke Bratch <luke@bratch.co.uk>2017-06-20 21:58:46 +0100
commitc26eeb7fb74886d0d003c63bb97e8f396cf05ccc (patch)
tree51431f3e325d2cb09901365e72b1c9300b197367 /graphs.php
Initial import
Diffstat (limited to 'graphs.php')
-rw-r--r--graphs.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/graphs.php b/graphs.php
new file mode 100644
index 0000000..981b107
--- /dev/null
+++ b/graphs.php
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+
+<html>
+
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+<title>Jersey Weather - Graphs</title>
+
+</head>
+
+<body>
+
+<?php
+
+echo "<p><a href=\"./\">Forecasts</a> | Graphs</p>\n\n";
+
+echo "<p><em>This page is currently slow - image caching coming soon.</em></p>\n\n";
+
+echo "<h2>Temperature / Rainfall</h2>\n\n";
+
+file_put_contents("temp.png", file_get_contents("http://data.gov.je/JerseyMet/Town/internet.Temperature.png"));
+file_put_contents("rain.png", file_get_contents("http://data.gov.je/JerseyMet/Town/internet.Rainfall.png"));
+
+echo "<p><img src=\"temp.png\" alt=\"Temperature\"> <img src=\"rain.png\" alt=\"Rainfall\"></p>";
+
+echo "<h2>UV index / Wind</h2>\n\n";
+
+file_put_contents("uv.png", file_get_contents("http://data.gov.je/JerseyMet/Town/internet.UV.png"));
+file_put_contents("wind.png", file_get_contents("http://data.gov.je/JerseyMet/Town/internet.Wind.png"));
+
+echo "<p><img src=\"uv.png\" alt=\"UV index\"> <img src=\"wind.png\" alt=\"Wind\"></p>";
+
+
+?>
+
+</body>
+
+</html>