PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Vivek moyal   PHP Webcam Capture Class   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Index file for showing the webcam
Class: PHP Webcam Capture Class
Save picture taken from Webcam to a file or MySQL
Author: By
Last change: Add files via upload
Date: 6 years ago
Size: 2,815 bytes


Class file image Download
<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">
    <title>How to Use Webcam In PHP</title>
    <link href="" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src=""></script>
      <script src=""></script>

    <div class="container">
        <div class="row">Tutorial at <a href=""></a></div>
        <div class="col-md-6">
            <div class="text-center">
        <div id="camera_info"></div>
    <div id="camera"></div><br>
    <button id="take_snapshots" class="btn btn-success btn-sm">Take Snapshots</button>
        <div class="col-md-6">
            <table class="table table-bordered">
                    <th>Image</th><th>Image Name</th>
            <tbody id="imagelist">
    </div> <!-- /container -->
#camera {
  width: 100%;
  height: 350px;

<script type="text/javascript" src=""></script>
<script src="jpeg_camera/jpeg_camera_with_dependencies.min.js" type="text/javascript"></script>
    var options = {
      shutter_ogg_url: "jpeg_camera/shutter.ogg",
      shutter_mp3_url: "jpeg_camera/shutter.mp3",
      swf_url: "jpeg_camera/jpeg_camera.swf",
    var camera = new JpegCamera("#camera", options);
    var snapshot = camera.capture();;
    snapshot.upload({api_url: "action.php"}).done(function(response) {
$('#imagelist').prepend("<tr><td><img src='"+response+"' width='100px' height='100px'></td><td>"+response+"</td></tr>");
}).fail(function(response) {
  alert("Upload failed with status " + response);

function done(){