summaryrefslogtreecommitdiff
path: root/graphs.php
blob: c96713ade87822d2284d85afdda71edcc47f5193 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!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>";


?>


<p><small><a href="http://www.blatech.co.uk/l_bratch/w.of.je/tree/master">Source?</a></small></p>

</body>

</html>