-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplay_latest_image.php
More file actions
42 lines (34 loc) · 1.53 KB
/
display_latest_image.php
File metadata and controls
42 lines (34 loc) · 1.53 KB
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
<?php
$page = $_SERVER['PHP_SELF'];
?>
<html>
<head>
<meta http-equiv="refresh" content="60" URL='<?php echo $page?>'">
<title>The Sky Above Us</title>
</head>
<body bgcolor=black>
<center><font size=8 color=white>The Sky Above Us</font><br><font size=5 color=white>Location = Somewhere On Earth | Owner = W.C.Observatory | </font>
<br><font size=5 color=white>
<?php
$today = gmdate("d-M-Y H:i:s")." UTC";
echo $today;
?>
</font>
<br><font size=5 color=white>
<?php
# $f = fopen("/sys/class/thermal/thermal_zone0/temp","r");
# $temp = fgets($f);
# echo 'SoC Temp. = '.round($temp/1000). '℃</font>';
# fclose($f);
?>
</font>
<?php
$files = glob('AllSkyData/*.*');
$files = array_combine($files, array_map('filectime', $files));
arsort($files);
echo "<br><a href='" . key($files) . "' target='_blank'><img src='" . key($files) . "' height=100%></a>";
?>
<br><font size=3 color=white>Powered by <a href="https://www.raspberrypi.org/" target="_blank"><font color=white>Raspberry Pi</a> and <a href="https://sites.google.com/site/meteotuxpi/home" target="_blank"><font color=white>Meteotux PI</a>.</font>
<center><font size=3 color=white>Integrated by William Chin</font>
</body>
</html>