adding updated code

This commit is contained in:
Janis Steiner
2024-06-18 09:36:11 +01:00
parent 0aaa1964fb
commit 0d7038c4b6
29 changed files with 4350 additions and 0 deletions

26
sys0-code/app/webcam.php Normal file
View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<?php
$username=htmlspecialchars($_GET["username"]);
$printer_url=$_GET["url"];
$rotation=$_GET["rotation"];
?>
<head>
<title>Webcam</title>
</head>
<body>
<?php
$path = "/var/www/html/user_files/$username/$printer_url.jpeg";
unlink($path);
exec("wget --quiet \"http://$printer_url/webcam/?action=snapshot\" -O $path");
echo("<img style='transform: rotate(".$rotation."deg);' loading='lazy' width='100%' src='/user_files/$username/$printer_url.jpeg'>");
?>
<script>
setInterval(function() {
location.reload();
}, 5000);
</script>
</body>
</html>