PHP Classes
elePHPant
Icontem

PHP Webcam Capture: Save picture taken from Webcam to a file or MySQL

Recommend this page to a friend!
  Info   Demos   View files View files (13)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-06-10 (2 months ago) RSS 2.0 feedStarStarStarStar 72%Total: 1,072 This week: 41All time: 3,379 This week: 12Up
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
  Performance   Level  
Name: Vivek moyal is available for providing paid consulting. Contact Vivek moyal .
Classes: 6 packages by
Country: India India
Age: ???
All time rank: 158493 in India India
Week rank: 9 Up1 in India India Up
Innovation award
Innovation award
Nominee: 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  
  Files folder image Files  
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  /  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  /  webcamImage  
File Role Description
  Accessible without login Plain text file webcam-image-folder.txt Data Dummy file to keep this directory

 Version Control Unique User Downloads Download Rankings  
 100%
Total:1,072
This week:41
All time:3,379
This week:12Up
User Ratings User Comments (2)
 All time
Utility:91%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:87%StarStarStarStarStar
Examples:87%StarStarStarStarStar
Tests:-
Videos:-
Overall:72%StarStarStarStar
Rank:242
 
great
3 months ago (Indika Kulasinghe)
80%StarStarStarStarStar
without shutter.
3 months ago (KillerDr)
80%StarStarStarStarStar