Kindagreywolf,
Here is a small tutorial:
First of all, download the WebCam2000 software from
http://www.stratoware.com/webcam2000/ (free). Install it on your hard drive.
Next, install Perl support in Abyss as described in
http://www.aprelium.com/abyssws/perl.html .
Launch the WebCam2000 software and configure it to act a web server on the port of your choice (it uses 8080 by default). You can also configure it to refresh automatically the web server image every 10 seconds for example.
Now, open your text editor and save the following code as webcam.pl and put it in /cgi-bin directory for example:
# (C) Aprelium Technologies - 2003
# This script is provided AS IS with no warranties.
# You are free to use it and to modify it.
# A CGI back-end script to a WebCam2000 server.
# The server URL (has to be changed according to your settings)
$url='http://127.0.0.1:8080/';
# Do not change anything below this line unless you
# know what you do.
# Create a user agent object
use LWP::UserAgent;
$ua = new LWP::UserAgent;
# Create a request
my $req = new HTTP::Request GET => $url;
# Pass request to the user agent and get a response back
my $res = $ua->request($req);
# Check the outcome of the response
if ($res->is_success) {
print "Content-type: " . $res->header("Content-type") . "\n";
print "Content-length: ". length($res->content) . "\n";
print "Refresh: " . $res->header("Refresh") . "\n";
print "\n";
binmode STDOUT;
print $res->content;
} else {
print "Status: 500 Server Error\n";
print "Content-type: text/html\n";
print "\n";
print "<HTML><BODY>Unable to get the image<BODY><HTML>";
}
Insert the following HTML code in your HTML pages to display the webcam image:
<IMG SRC="/cgi-bin/webcam.pl">
The script should be edited to update the
$url variable if your WebCam2000 server is not using port 8080.
Please contact
support@aprelium.com if you have any question about the script.