fixing webcam issues

This commit is contained in:
Janis Steiner
2024-10-14 12:38:32 +01:00
parent 5e853f4000
commit 3e1380ca47
2 changed files with 42 additions and 15 deletions

View File

@@ -0,0 +1,12 @@
<?php
// Get parameters
$username = htmlspecialchars($_GET["username"]);
$printer_url = $_GET["url"];
// Path to save the downloaded image
$path = "/var/www/html/user_files/$username/$printer_url.jpeg";
// Download the latest snapshot from the printer URL
exec("wget --quiet \"http://$printer_url/webcam/?action=snapshot\" -O $path");
?>