Clevedon Weather

Personal Weather Station

Live Weather conditions from Clevedon, North Somerset, UK

Weather Display - Monthly All Time Records

This simple script is a version of one of the first scripts I produced although I do not currently use it myself on my site it was produced for a friend. It will display the graphics the Weather Display produces each month with the monthly records.

I wanted an easy way to display the same month from previous years to compare weather conditions between years.

This is a very simple script to setup and only requires three variable to be changed to suit your own web site. You need to set the first year you started collecting data with Weather Display and first month. This prevent the script trying to display graphics that are present. The final setting to the location on your directory with your Weather Display is stored.

Below is the script which could be cut and pasted into your own site and edited with your own setting. At the bottom of the page is a link to download a zip file of the script.

Without adjusting the settings the script should display my weather records.

When you load this script http://www.....matr-script.php it should display the current months all time records with thos years records first followed by every other years records you have.

To display other months records just add a parameter ?month=n to the end of the URL eg. http://www.....matr-script.php?month=4 to display April's records.

The script provided works but you will want to refine it for your own use. One simple refinement would be to add a series 12 links to navigate to each month of the year

To see the script in use is at Example of Script in use Weather

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="" xml:lang="en" lang="en">

<title>Weather Display Monthly Records for selected month</title>


<p>Insert Your Page Header Before Here</p>



// PHP script to display monthly weather display all time records. When page load it display the current month for this year
// the same month for all previous years in reverse order.
// To display other months record add ?month=1 to the URL to display Januarys records and ?month=12 to display Decembers etc.
// eg
// Copyright Ian Knox 2013 - Clevedon Weather
if (isset($_GET['month']))

$firstyear=2009// set to the first year of your records
$firstmonth=4;        // set to the first month of your records;
$wd_directory=""// set the file path to the location of your weather display files

if ($mon<$firstmonth) { // increase first year by one if month before first month
if (
mktime(1,0,0,$mon,2,date("Y"))>time()) {  // decease this year by one if selected month after this month and 1 day and 1 hour

for (
'<p align="center">' .date("F Y"mktime(000$mon1$yr)) ."</p>";
'<p align="center"><img src="'$wd_directory $mon $yr .'alltimerecordsmonth.gif" alt="Graphic"/></p><br/>';

<p>&copy; Ian Knox - Clevedon Weather 2013</p>

<p>Insert Your Page Footer After Here</p>


The above script can be download Monthly All Time Records Script requires PHP5

Never base important decisions on this or any weather information obtained from the Internet.

Home | Weather Related Links | Detailed Weather Summary | Daily Reports | Live Weather Cam |
Weather Forecasts | Live Weather | About my Personal Weather Station | My Photos
Contact Webmaster
Last modified: October 10 2017 18:29:34.