MoinMoin,
wir bekommen zur Zufahrtsregelung eine Schranke vor unseren Laderampen.
Diese soll über eine Webseite, welche auch mit der Anzeige von 2 Kameras versehen ist, zu öffnen sein.
Zum öffnen soll die Schranke einen Impuls von 1 Sekunde Dauer bekommen.
Das funktioniert auch mit folgenden Dateien einwandfrei.
Leider kann man nun so oft und so schnell hintereinander klicken wie man möchte. Jeder Klick wird ausgeführt.
Gibt es eine Möglichkeit ein nach Ausführen des Scriptes erneutes Aufrufen für 20 Sekunden zu unterbinden?
Mir ist bei der Recherche zu diesem Thema die Funktion flock begegnet. Ich kriege sie allerdings nicht dazu mir die Ausführung zu unterbinden.
Eine weitere Problematik ist die Möglichkeit den Quelltext einzusehen. In diesem stehen leider in Klarschrift die Zugangsdaten der beiden Kameras.
Kann man diese Logindaten vllt. verschleiern?
Über einen hilfreichen Tritt in die Seite würde ich mich als absoluter Neuling in diesem Thema freuen.
Vielen Dank schon mal,
Honk
iframe.php
<?php
if(isset($_GET['Befehl'])) {
ob_end_flush();
if($_GET['Befehl'] === 'impulsein') {
$val = trim(@shell_exec("/usr/local/bin/gpio -g write 23 1"));
}
flush();
sleep(1);
trim(@shell_exec("/usr/local/bin/gpio -g write 23 0"));
}
?>
<html>
<style>
body {background-color:#DCDCDC;}
</style>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>iframe.php</title>
</head>
<body>
<p>
<a href="<?php print($_SERVER['PHP_SELF']); ?>?Befehl=impulsein">
<img src="schranke-hoch.png" height="200" width="200" style="border:none;"></a></p>
</td>
</body>
</html>[/php]
Schranke.html
[code]<html><head>
<style type="text/css">
.auto-style1 {
text-align: center;
}
.auto-style5 {
margin-right: 0px;
}
.auto-style6 {
text-align: left;
}
.auto-style7 {
font-size: large;
color: #FF3300;
font-famaly:verdana;
}
body {
background-color: #DCDCDC;
}
</style>
<meta content="de" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Schrankenkontrolle</title>
</head>
<body>
<table>
<tr>
<td class="auto-style6" style="width: 1342px">
<div class="auto-style1">
<img src="logo.png" width="450" ><br></div>
<h1 class="auto-style1"><span class="auto-style7"style="font-family: verdana; font-size: 16pt;">Schrankenkontrolle</span><br></h1></td>
</tr>
</table>
<table class="auto-style5">
<tr>
<td class="auto-style1" style="width: 676px; ">
<embed id="streamip" marginwidth="1" type="application/x-vlc-plugin" src="rtsp://xxxxx:xxxxx@192.168.xxx.xxx" marginheight="1" style="top: 30px; left: 30px; display: inline; width: 640px; height: 360px; visibility: visib$ pluginspage=; margin-right: 0px; margin-top: 0px; margin-bottom: 0px;"http://www.videolan.org" toolbar="true" name="streamip" class="auto-style3"/>
</td>
<td style="width: 693px;" class="auto-style1">
<embed id="streamip0" marginwidth="1" type="application/x-vlc-plugin" src="rtsp://xxxxx:xxxxx@192.168.xxx.xxx" marginheight="1" style="top: 5px; left: 5px; display: inline; width: 640px; height: 360px; visibility: visible$ pluginspage=; margin-right: 0px; margin-top: 0px; margin-bottom: 0px;"http://www.videolan.org" toolbar="true" name="streamip0" class="auto-style4"/></tr>
</table>
<table>
<tr>
<td class="auto-style1" style="width: 1370px"><br><br>
<iframe height="280" width="280" frameborder="0" src="iframe.php" scrolling="no" id="I1" name="I1" bordercolor="#FF3300" marginheight="0" marginwidth="0"></iframe>
</td>
</tr>
</table>
</body>
</html>
Alles anzeigen