A couple days ago someone had mentioned wanting to use a webcam with a
dynamic IP address... Following is a CGI script I use (along with a pair of
simple scripts on my machine to update a file containing my address using
rebol FTP) The webcam software I'm using is called WebCam2000 (it's for
Win32 only unfortunatly), their homepage is
http://www.1000klub.com/~loomer/webcam2000
another solution (not involving rebol) for using a webcam without a static
IP address is to use dhs.org and their DynDNS service.
The scripts to update the file on the server are as follows:
---
REBOL [ Title: "Camera On" ]
addr: join http:// [ read join dns:// read dns:// to-url ":8080" ]
save ftp://user:[EMAIL PROTECTED]/WWW/webcam-addr.txt addr
---
REBOL [ Title: "Camera Off" ]
save ftp://user:[EMAIL PROTECTED]/WWW/webcam-addr.txt "42"
---
And the CGI script itself is:
---
#! /home/dixon/rebol -cs
REBOL [
Title: "webcam feed"
File: %cam.r
Author: "Cal Dixon"
EMail: [EMAIL PROTECTED]
Rights: {
Copyright (c) 1999 Caleb Dixon. This version is free for ANY
use.
Do whatever you want with it as long as you don't claim to
have created this.
}
Date: 6-Feb-2000
Version: 1.0
Purpose: ""
Comment: ""
Notes: ""
]
addr: load %webcam-addr.txt
either (type? addr) = url! [
prin "Content-Type: image/jpeg^/Refresh: 3^/"
pic: read/binary addr
] [
prin "Content-Type: image/jpeg^/"
pic: read/binary %camera-off.jpg
]
write-io system/ports/output pic length? pic
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com