56.9 °F

Hum: 29% Dew: 24.9 °F
Baro: 1022.63 hPa
Wind: NNW @ 3.6 mph
Rain: No Rain Today
Data Updated: 15:25
TNET Weather Station - Mesa, AZ USA
Home   Forecasts   Graphs   Radar   Trends   Webcams   Weather Links   Archives   PROJECTS & SCRIPTS   About Us
Webcam Views Around Phoenix > How it is done

How it is done

The 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.

Perl Script

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).

GNU Wget

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:

TNET_WXbot/1.0 (+http://TNETWeather.com/tws-bots.php)

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.

HTML5 Slideshow

We are using hacked up version some code based on a website A better simple slideshow, by Mark Lee which is a wonderful set of scripts.

Copyright © 2018 TNET Systems Inc. - All rights reserved. Weather Collection for this website is done via Cumulus 1.9.4 build #1093 and Weather Display
Boltwire Cumulus Plugin by TNET using Boltwire v3.4.16 Hosting by TNET
Protens Server - IP: [ec2-23-22-240-119.compute-1.amazonaws.com] - Views #47