Weather Web Cam Images History PHP Script and Template Plugin

Weather Web Cam Images History PHP Script and Template Plugin

Version: 1.02 04-Nov-2009

  • Improved thumbnail image links. Better JavaScript link method.

Version: 1.01 19-Sep-2008
– Fixed default settings inside cam-history-inc.php, the default $script_name setting was wrong
– minor comment cleanup in all files
– no feature changes in this release.

Live Demo:
You can see my weather cam archives in use here:
http://www.642weather.com/weather/cam-history.php

Requirement:
You HAVE to be using my ‘PHP Web Cam Image Text Overlay’ method from my tutorial here:
http://www.642weather.com/weather/scripts-weather-cam-text.php
If you have completed the tutorial you will have a web cam image that updates every 5 minutes on your web server.

Installation instructions are in the included readme.txt in the zip file download below.

If you use the “Carterlake Weather Display/PHP/AJAX Website USA Template Set” from http://saratoga-weather.org/template/index.php
then you can use the included wxcam-history.php
else there are easy instructions to integrate into your own site template page.

More about it:
http://www.642weather.com/weather/scripts-weather-cam-history.php

Download:
http://www.642weather.com/weather/scripts/web-cam-history.zip

If you downloaded it before this post, please download again.
cam-view.php had a tag left in there from my server config.

Wow quick turn around … :slight_smile: Thanks again

Let me know if you try it, please report any problems you might have.

Way to easy http://willcookweather.com/wxcam-history.php

Will play with that day night setting (which is what I also liked) before I post but for now … I LOVE IT :slight_smile:

Don’t forget to set the page title settings inside cam-view.php

Got it thanks … did not catch that. Ok so all working except … it is still making images AFTER the camera has been shut off (notice time in top right corner. Had to set that so I could check that new images are being uploaded). A little confused, do I set this $disable_refresh_at_night = 1 to 1 or 0 to turn off the making of images at night?

Any other settings I should set to turn off?

$disable_refresh_at_night = 1, all that does is disable the meta refresh on the web cam history page at night to save bandwidth if someone leaves that page open for hours at night.

Did you put this in your image-webcam-overlay.php?
replace:

$archive =1;

with:


include_once './testtags.php';
if($dayornight == 'Night') {
       $archive =0;
}else{
       $archive =1;
}

What that does is prevent your web cam image from archiving to your web cam history page at night.

Oops :oops: mis-read that. Thought it did not pertain since I was using the wxcam file … thanks again

EDIT: Well made your changes but it is still not working … and I found out why. It seems my testtags.php does NOT have statement $dayornight :frowning:

EDIT EDIT: That did it. Added the $dayornight setting to testtags.txt and now it is turned off. Whew … this stuff ain’t easy :slight_smile: Wonder how many more settings I am missing?

Sorry you had trouble, I added a note about that to the readme.txt

here is the note …

Note: your testtags.php file must contain the $dayornight tag
if it does not, edit the template in your wdisplay/webfiles folder and add this line to it:
$dayornight = ‘%dayornight%’;

jimmyb,

The page links are broken…

You need to edit your cam-history-inc.php …

change your $script_name variable to this:
$script_name = ‘wxcam-history.php’;

I will make this the default in vers 1.01

Version: 1.01 19-Sep-2008
– Fixed default settings inside cam-history-inc.php, the default $script_name setting was wrong
– minor comment cleanup in all files
– no feature changes in this release.

Thank you sir. Fixed. Did not bother checking the pages until you mentioned them.

Mike,

Thanks for sharing another great script. I am using the webcam overlay and webcam history scripts on my website now.

Ken

Hi All,

I’m in the process of setting up the “Weather Web Cam Images History PHP Script and Template Plug in”, before I do I have to setup the “Multifunction Image Handler PHP Script”. I think I have it setup properly but when I try and test it I get a “Error: 009”.

Any help would be appreciated.

John

John,

That error means the cache output file ($outputimgName) is not being saved.

To be able to help, I need the url to your script and the settings you set in it.

Hi

http://www.johnsnhweather.com/image-webcam-overlay.php

$ImageURL = ‘http://www.johnsnhweaher.com/webcamimage-plain.jpg’;
$localimgName = ‘webcamimage-temp.jpg’;
$outputimgName = ‘webcamimage.jpg’;

include ‘./testtags.php’;
$timezone = date(‘T’);
$temperature = preg_replace(‘/°F/’, ’

Yes that is what I needed

Your image is missing, are you uploading a web cam image to you site?
http://www.johnsnhweaher.com/webcamimage-plain.jpg

Yes –


Capture.JPG

Your domain name was misspelled (missing the t in weather)

$ImageURL = ‘http://www.johnsnhweather.com/webcamimage-plain.jpg’;