Skip to main content.

Weather Web Cam Images History PHP Script by Mike Challis

This is a tutorial on how to use my PHP script to make a web cam image history thumbnail page. You can see my weather cam archives page here: Weather Cam Archives
Installation instructions are in the included readme.txt in the zip file download.

Step 1) You HAVE to be using my 'PHP Web Cam Image Text Overlay' method from my tutorial here: PHP Web Cam Image Text Overlay
If you have completed the tutorial you will have a web cam image that updates every 5 minutes on your web server. Is that happening? OK, continue ...
make a new folder called 'webcam' on your server
my site is..
http://www.642weather.com/weather/
so I made it ..
http://www.642weather.com/weather/webcam/

Now edit your image-webcam-overlay.php and set the settings to allow it to archive images in a ./webcam folder like this:

#####
# Auto archive images feature (great for web cam images)
#####

$archive = 1;

# How many archived images will be stored (set to whatever you want)
$archivecount = 1000;

# Where will the archived images be saved
$archivedir = '/full/path/to/webcam/';
# change the path, so it is correct. full path is recommended

# prefix of the archived file name
# (if you change it here, you also have to change it in cam-view.php and cam-history-inc.php)
# not recommended to change after initial setup
$archivefilepre = 'webcamimage';

# autogenerate thumb images of the archived?
$archivewiththumbs = 1;

$thumb_new_width = 100; # thumb image width size (height will auto size)
upload the image-webcam-overlay.php

Upload your image-webcam-overlay.php, wait 5-10 minutes then make sure cam images are loading into webcam folder like this

webcamimage0.jpg
webcamimage0-thm.jpg
webcamimage1.jpg
webcamimage1-thm.jpg
webcamimage2.jpg
webcamimage2-thm.jpg
etc.

Step 2) You have done the requirement above and have images and thumbs saving on your web server? OK, continue ...
Edit the settings at the top of cam-history-inc.php and cam-view.php
there are a few file paths and page title settings to set.


Step 3) Did you check the settings in BOTH files? cam-history-inc.php and cam-view.php
ok, now ...
upload cam-history-inc.php and cam-view.php to your server
now ...

If you use the carterlake Weather Display/PHP/AJAX Website USA Template Set
from saratoga-weather.org, upload wxcam-history.php to your server, now view wxcam-history.php and see if it works, you are done!
else you have to complete step 4 in the readme.txt from the zip file to integrate into your web site.

Step 4) Optional (web site integrate if not using the carterlake templates)
See the readme.txt from the zip file for how to integrate into your own PHP site template.

Weather Web Cam Images History PHP Script: [download it] | [version change log]

Discuss this tutorial here | More Weather PHP Scripts

Sites using my Weather Web Cam Images History PHP Script:


Gratuity


If you find this site or the free PHP scripts useful to you, please consider making a small donation to help offset my time and the routine expenses of operation of this website. Thanks for your kind support! - Mike Challis

This php code provided "as is," and Long Beach Weather (Michael Challis) disclaims any and all warranties, whether express or implied, including (without limitation) any implied warranties of merchantability or fitness for a particular purpose. Use of this code signifies your acceptance.