GISTS/web/dcs-5020l-camera-control.php
2024-05-02 00:16:45 +02:00

77 lignes
Pas d'EOL
3,5 Kio
PHP

<?php
// Simple D-Link DCS-5020L camera web control
$camIP="172.16.3.14";
$camUser="admin";
$camPass="";
?>
<!DOCTYPE html>
<html>
<head>
<title>D-Link DCS-5020L cam control for <?php echo($camIP); ?></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css" title="design">
th,h1 {
border: 3px dashed green;
border-left: 1ex solid green;
margin-right:30ex;
text-transform: uppercase;
}
tr {width:33%;}
button {
width: 5ex;
height: 5ex;
text-align: center;
cursor: pointer;
border: 1px solid #ddd;
}
.angle {background-color: #aaa;}
</style>
<script language="JavaScript">
function refreshIt() {
if (!document.images) return;
document.images['cam'].src = "http://<?php echo($camUser.':'.$camPass.'@'.$camIP); ?>/image/jpeg.cgi?" + Math.random();
setTimeout("refreshIt()",400);
}
</script>
</head>
<body onLoad="setTimeout('refreshIt()',1000)">
<h1>D-Link DCS-5020L camera control for <?php echo($camIP); ?></h1>
<div style="width:75%;text-align:center; float:right;">
<img src="http://<?php echo($camUser.':'.$camPass.'@'.$camIP); ?>/image/jpeg.cgi" title="" name="cam">
</div>
<div style="margin:10ex 10ex auto 10ex; padding: 2ex;">
<form name="PanTiltSingleMove" action="http://<?php echo($camUser.':'.$camPass.'@'.$camIP); ?>/pantiltcontrol.cgi" method="POST">
<input type="hidden" name="PanSingleMoveDegree" value="5">
<input type="hidden" name="TiltSingleMoveDegree" value="5">
<table>
<tr>
<td><button type="submit" name="PanTiltSingleMove" value="0" class="angle">↖</button></td>
<td><button type="submit" name="PanTiltSingleMove" value="1">↑</button></td>
<td><button type="submit" name="PanTiltSingleMove" value="2" class="angle">↗</button></td>
</tr><tr>
<td><button type="submit" name="PanTiltSingleMove" value="3">←</button></td>
<td><button type="submit" name="PanTiltSingleMove" value="4" class="angle">⌂</button></td>
<td><button type="submit" name="PanTiltSingleMove" value="5">→</button></td>
</tr><tr>
<td><button type="submit" name="PanTiltSingleMove" value="6" class="angle">↙</button></td>
<td><button type="submit" name="PanTiltSingleMove" value="7">↓</button></td>
<td><button type="submit" name="PanTiltSingleMove" value="8" class="angle">↘</button></td>
</tr>
</table>
</form>
<div style="margin-top:2ex;">
<!-- IR CONTROL NOT WORKING, TRYING TO FIND ANOThER WAY...
<form name="setDaynightMode" action="http://<?php echo($camUser.':'.$camPass.'@'.$camIP); ?>/setControlDayNight" method="POST">-/->
<form name="setDaynightMode" action="http://<?php echo($camUser.':'.$camPass.'@'.$camIP); ?>/setDaynightMode" method="POST">
<input type="hidden" name="ReplySuccessPage" value="night.htm">
<input type="hidden" name="ReplyErrorPage" value="errrnight.htm">
<input type="hidden" name="ConfigDayNightMode" value="Save">
<button type="submit" name="DayNightMode" value="3">IR on</button>
<button type="submit" name="DayNightMode" value="2">IR off</button><br>
<button type="submit" name="DayNightMode" value="0" style="width: 10.5ex;">IR default</button>
</form>-->
</div>
</div>
</body>
</html>