forked from zyphlar/ip-camera-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·82 lines (71 loc) · 2.28 KB
/
index.php
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/* IP Camera Proxy
* PHP frontend to interface with cheap password-protected webcams and
* pull images for public display on a website
*
* Copyright Will Bradley, 2012 (www.zyphon.com)
* Distributed under a Creative Commons Attribution 3.0 license
* http://creativecommons.org/licenses/by/3.0/
*
* See the snapshot.php file or README for setup instructions.
*
*/
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript">
function refresh() {
document.getElementById("livestream1").src = "snapshot.php?camera=1&"+Math.round(Math.random()*1000000);
document.getElementById("livestream2").src = "snapshot.php?camera=2&"+Math.round(Math.random()*1000000);
document.getElementById("livestream3").src = "snapshot.php?camera=3&"+Math.round(Math.random()*1000000);
}
function pageLoad() {
setInterval ( "refresh()", 30000 );
}
</script>
<style type="text/css">
body { background-color: #2C2C29; color: #2C2C29; font-family: Tahoma; font-size: 11px; margin: 0; padding: 0; }
#wrapper { width: 1024px; margin: 0 auto; }
#top { height:116px; margin: 0 0 0 5px; }
#content { background-color: #fff; padding: 1em 0 1em 1em; font-size: 1.2em; }
.caption {
background-color: #F3F3F3;
border: 1px solid #DDD;
padding: 3px;
margin: 0 0 20px 1px;
width: 320px;
display: inline-block;
}
.footer {
clear: both;
}
h1,h2,h3,h4 {
font-family: Helvetica, Georgia;
font-size: 24px;
letter-spacing: -1px;
margin: 0px 0px 10px;
border-bottom: 1px solid #DCDCDB;
}
h2 { font-size: 22px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
</style>
</head>
<body onLoad="pageLoad()">
<div id="wrapper">
<div id="content">
<h2>Live Webcams</h2>
<div class="caption">
<img id="livestream1" src="snapshot.php?camera=1" width="320" height="240" />
</div>
<div class="caption">
<img id="livestream2" src="snapshot.php?camera=2" width="320" height="240" />
</div>
<div class="caption">
<img id="livestream3" src="snapshot.php?camera=3" width="320" height="240" />
</div>
</div>
</div>
</body>
</html>