PHP Classes


Recommend this page to a friend!
  Classes of Maik Greubel   PHP Webcam Fetch   Download  
Role: Example script
Content type: text/markdown
Description: Example script
Class: PHP Webcam Fetch
Capture images from a remote webcam
Author: By
Last change:
Date: 1 year ago
Size: 2,135 bytes


Class file image Download


This package provides a simple access to check, retrieve, store locally, shrink and archive jpeg images from a remote webcam. The Webcam must be accessible using HTTP protocol.


It is the first application which makes use of my phpGenerics component framework, with intention to test the components. You may want to use Ant to perform tests and create documentation.

It uses composer to resolve dependencies and Ant for test and documentation creation lifecycle. Please install Ant and composer (don't forget to add a composer.bat or unix shell script for easy access, which calls "php composer.phar"), and type



You can use it in a cronjob, shell script or inside your own webpage. See the unit tests and documentation to get an idea how to use it. Here is a small concept code for demonstration purposes:

require 'vendor/autoload.php';

$url = UrlParser::parseUrl("");

$wcf = new WebcamFetch($url, 80, $this->localFileName, 300);



// Send it to web browser (in case of web page integration)


The package is published under the terms of the BSD-2-Clause. You may find a copy of it in attached to this package.

Source and API documentation

The full source is published at github available at

The API documention can be build using the phpdocumentor (which is added as dev-dependency) by installing it first

composer install-dev

and generate the documentation in "output" folder by typing


or on MS Windows


As mentioned before, you can also use Ant to generate the documentation. After successful exection of ant command you will find a new folder "API_Documentation".


If you need further assistance or find a bug, please use the issue tracker on github project page.

Continuous Integration status is published at my jenkins site available at