Got 5 minutes and a webcam? That’s all it’ll take to set yourself up with some very basic video surveillance. This tutorial doesn’t claim it’ll solve any high end security needs, but yes basic motion detection is possible with a webcam and PHP.

Also, be sure to check out Motion, an open-source Video-for-Linux (V4L) project.

There are a number of PHP interfaces that people are building for it (check out the wiki for details).

I have a full-time security system, built on Motion. It monitoris my house and the perimeter with *cough* cameras (more than two, less than ten) going to a concealed machine with plenty of backup power. The cameras have IR boost for night-time security. I get about 10 fps/camera, and record both stills and video. I keep about two weeks worth of event data in a secure, web-accessible hierarchy by date and time. The capture data itself is timestamped and labeled as to its location.

My system has yielded images that are helping the police with an ongoing investigation. During the events leading up to this, I had one camera send me an SMS message any time there was motion detected, which enabled me to observe events in near realtime. If you need true realtime observation, there are ways to make it work with Motion, but I have no experience with them and can’t speak to their quality.

Also, the Motion user community (the mailing list) is probably one of the most helpful, collaborative Open Source communities I’ve dealt with.