PHP Classes

How to Capture Image using Webcam and Save to Database in JavaScript by Creating a Laravel Webcam Capture App with the PHP Webcam Capture Class: Save picture taken from Webcam to a file or MySQL

Recommend this page to a friend!
  Info   Demos   Videos   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 73%Total: 5,835 This week: 1All time: 397 This week: 38Up
Version License PHP version Categories
webcam-in-php 1.0.4GNU General Publi...5HTTP, PHP 5, Graphics, Files and Folders
Description 

Author

This class can save picture taken from Webcam to a file or MySQL.

It can take a request sent from a JavaScript script that takes a snapshot of a image taken with the Webcam and saves the image to a server file.

The class serves the path of the saved image as output of the handler script, so the browser can display it to the user.

The image can also be saved to a MySQL database table record.

Innovation Award
PHP Programming Innovation award nominee
April 2017
Number 5


Prize: One big elePHPant Plush Mascott
Many Web sites need to take pictures of their users. One way to achieve this is to take a snapshot of the user image using his computer or mobile device Webcam.

This class can take pictures captured using a Webcam and uploaded to the server, so it can save the images to server files or a MySQL database table.

Manuel Lemos
Picture of Vivek moyal
  Performance   Level  
Name: Vivek moyal is available for providing paid consulting. Contact Vivek moyal .
Classes: 7 packages by
Country: India India
Age: ???
All time rank: 35519 in India India
Week rank: 49 Up7 in India India Up
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Details

Webcam in PHP Using html5

Use webcam in PHP using HTML5, Jquery and Save the Image to Database

This repository will help you to integrate and save the captured image to the database or local folder.

webcamClass.php

Here are some code structure to understand the important parts of this class.

$imageFolder="your folder"; - This is your folder where you would like to save the file
showImage() - This function will get the image and return the name including the path

If you want to save the image to database than you can use this function.

changeImagetoBase64() - This function will change the image to base64 
saveImageToDatabase() -  It will help you to save the image to database


  Use Webcam in PHPExternal page  

Open in a separate window

Videos (2)  
  • How to use webcam in php Part   2
  • How to use webcam in php Part  1
  Files folder image Files (13)  
File Role Description
Files folder imagejpeg_camera (5 files)
Files folder imagewebcamImage (1 file)
Plain text file connectionClass.php Class Database connection class file
Plain text file webcamClass.php Class Webcam class file to get the image and save the image
Accessible without login Plain text file action.php Example Example script
Accessible without login Plain text file index.php Example Index file for showing the webcam
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file webcam.sql Data Auxiliary data

  Files folder image Files (13)  /  jpeg_camera  
File Role Description
  Accessible without login Plain text file canvas-to-blob.min.js Data Auxiliary data
  Accessible without login Plain text file jpeg_camera_no_flash.min.js Data Auxiliary data
  Accessible without login Plain text file jpeg_camera_with_dependencies.min.js Data Auxiliary data
  Accessible without login Plain text file swfobject.min.js Data Auxiliary data
  Accessible without login Plain text file test.txt Doc. Documentation

  Files folder image Files (13)  /  webcamImage  
File Role Description
  Accessible without login Plain text file webcam-image-folder.txt Data Dummy file to keep this directory

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:5,835
This week:1
All time:397
This week:38Up
User Ratings User Comments (2)
 All time
Utility:92%StarStarStarStarStar
Consistency:92%StarStarStarStarStar
Documentation:89%StarStarStarStarStar
Examples:89%StarStarStarStarStar
Tests:-
Videos:-
Overall:73%StarStarStarStar
Rank:119
 
great
7 years ago (Indika Kulasinghe)
80%StarStarStarStarStar
without shutter.
7 years ago (KillerDr)
80%StarStarStarStarStar