Friday, February 11, 2022

Setup a camera on the web

How to put your webcam online

People used to ask me all the time... "Dan, how do I set up a webcam like yours <webcam.html>?" No more questions, friends - this is how you set up a webcam. Follow these instructions to the letter, and you will find yourself attracting voyeurs, stalkers and freaks in no time.

1. Buy a webcam. I use the 3Com Homeconnect camera, and I think it's fantastic. (Unfortunately, it doesn't look like it's being manufactured any longer, so if you find one in a store, buy it real quick. eBay <> usually has some.) I wrote an Epinions review <> of it, if you'd like to read more about my camera.  

2. Install your camera, and get it working on your computer. I can't help you with this part. Ask your computer store, or read the help files, or look on the net, or something.

3. Most cameras will come with software to let you make home movies and such, but they don't usually work for putting a live camera on the web. The most popular choice for this is the Webcam32 <> package from Surveyor, but I personally use ConquerCam <>. (Spycam <> is also pretty good.) Both ConquerCam and SpyCam are quite userfriendly, and they can save across a network, and are just generally better than Webcam32. In my humble opinion, at least. (If you're not on a Windows system, I don't know what you should use. Sorry about that.)

4. After you set the software up, including all of the FTP settings to actually get your image to your web server, you'll need to put your image on your site. You can simply put the image up on your page with an <img> as you usually would, but if you want it to refresh automatically so that people don't have to reload your page all the time, you'll need a java applet.

I'm using an applet that comes as part of the Anfy <> java package, which I can't redistribute here. I highly, highly recommend that you use the Anfy applet <>. However, if you'd like something a little simpler, I have provided another applet for you in a zip file, which you can download here <>. Please note that this applet seems to only work for some people - there's some weird problem that prevents a few users from ever getting it to work, and I don't know why. You have been warned.

Unzip the file and put the applet into the directory where you have your webcam page, and then use the code below to make the applet do its thing.

<APPLET code="javacam.class" width=320 height=240>
<PARAM name="url" value="">
<PARAM name="interval" value="15">
The first line is self-explanatory, hopefully. The first PARAM is the path to the image your camera is taking, and the second PARAM is how often you want the applet to refresh the picture. If you upload a new picture every minute, change the "15" to "60". If you upload every 30 seconds, change it to "30". And so on. (Note: this is case-sensitive!)

And that's it.

I cannot offer any support other than what is already here. If you've found this tutorial helpful, you should e-mail me <contact.html> to let me know, and you should link to this page from your site.

And when you get your cam online, tell me <contact.html>! I will be glad to list your cam in the Directory <>.

This tutorial has been linked to from 321 Webmaster <>, <>, Tutorials 911 <> and the Open Directory <>.