PHP code example of vdechenaux / webcam
1. Go to this page and download the library: Download vdechenaux/webcam library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vdechenaux / webcam example snippets
$webcam = new \VDX\Webcam\Webcam();
// It can produce an other size if your webcam does not support the provided size
$webcam->setDesiredSize(1280, 720);
if ($webcam->open()) {
$webcam->saveFrame('/tmp/test.jpg'/*, true*/); // It accepts a second parameter to mirror the image
$webcam->close();
}