How it is doneThe following describes how I obtain the images, and display them both as a current image, and as a collection of images in a slide show.
First the Source
The source of the webcam images is from Phoenix Visibility Website. They provide a page which displays the 5 webcam images that you see. Their primary purpose is to show visibility around the Phoenix Metro Region.
Obtaining the Images
To obtain the images, I use two tools.
I use a simple Perl script to identify which image locations that I want and to use wget to obtain them.
The script has a subroutine which when called with each filename, goes and fetches the image, compares the new image against the current one, and if the date of the file is newer, replaces the current image and stores a history image in a directory in the format of: 201002092351.camera_name.jpg
If the image is updated and a history image save, a clean directory function is run to remove any images that exceed 72 (we keep the last 72).
This is a simple but very powerful utility that allows you to get remote web objects and store them on your server.
All, wget usages we do are identified as:
This lets the source site know who is making these connections and provides a link to what we are and why we are doing what we are doing.
Displaying the Image via Lytebox
Next is the web page itself which is setup using Lytebox's Lyteframe function. This points to the current image for the image to display on the page, and a URL which points at a PHP source file that outputs the PHP/SWF Slideshow of the collected historical images.
You see the slide show pop up when you click on the image.
This is a commercial component by Maani that displays a series of images as a slideshow. When called a small script collects which images are available and passes it onto the slideshow flash component for display.
What you see is a darkened background with a frame in the foreground containing a slideshow of all the images found in the history folder.
A control is displayed to allow the visitor to stop, and move through the images themselves.
Note: Maani, no longer develops the PHP/SWF slideshow but does have an alternative that does basically the same thing called Slickboard .