Weather station scripts

They're free, but use at your own risk

The scripts referenced here are used in the operation of this weather station, and may be freely copied and used to support your station. Please note that you use these scripts at your own risk. No warranty is expressed or implied. I accept no liability for any damages that may ensue from their use.
You will need to configure them for your own particular weather station website.
RSS feed for Scripts Updates A RSS Feed is available to help keep you informed on updates to the scripts.

Many of these scripts are now available on GitHub at

Buy Me A Coffee If you find one or more of the scripts useful to you, please consider making a donation to help offset the routine expenses of operation of this website.
Thanks for your kind support!

A Version History is available -- check back from time to time to see if there are updates to scripts you have downloaded earlier. Announcements of version updates and new scripts are made on and Weather-Watch forums and saratogaWXPHP Twitter account as they become available.

Note: Twitter widget has been disabled 3-Jul-2023 since it no longer displays the recent update Tweets.

This page was updated Thursday, 04-Feb-2016 1:47 PM

PHP Scripts (run on webserver)


Great PHP scripts from others...

I've used several scripts from other folks and they have my greatful thanks for sharing their developments! Here are the links:

Testing to see if PHP is available on your website

PHP scripts require PHP-capable web hosting to run. You can compare features and base prices for many hosting providers at Web Hosting Search. I do recommend that you use a Linux/Apache web host -- the scripts seem to run better on that platform and require fewer adjustments to get working correctly.

If you are using a website provided free by your internet service provider as part of your ISP subscription, it's unlikely that PHP will be available. I recommend that you avoid 'free' PHP hosting services -- they tend to add HTML/JavaScript code to each of your pages which will render them not valid XHTML, and may prevent the scripts that generate images from working at all. If you pay $5 to $15/month for a website, then it's likely that PHP would be available and these and other scripts should work fine.

To check your website out, just copy the following code and paste into a new .php page, upload it to your website, and view it with your browser. The name of the file is not important, but the .php extension is: it tells the server to invoke the PHP engine and parse the page, so don't expect this to work if you upload it as a .htm or .html file. You can see my example working here and failing here (failing beause I made .html the extension for this example).

<title>PHP test</title>
<h1>Does PHP work?</h1>

<?php echo "<h2>Yes, it does.  PHP Version " phpversion() ."</h2>"
"<p>To run the WXGRAPHIC script, you need GD enabled in PHP.\n";
"<br />Current GD status:</p>\n";
// Retrieve information about the currently installed GD library
// script by phpnet at furp dot com (08-Dec-2004 06:59)
//   from the PHP usernotes about gd_info
function describeGDdyn() {
"\n<ul><li>GD support: ";
"<font color=\"#00ff00\">yes</font>";
$info gd_info();
$keys array_keys($info);
$i=0$i<count($keys); $i++) {
is_bool($info[$keys[$i]])) echo "</li>\n<li>" $keys[$i] .": " yesNo($info[$keys[$i]]);
else echo 
"</li>\n<li>" $keys[$i] .": " $info[$keys[$i]];
 } else { echo 
"<font color=\"#ff0000\">NO</font>"; }
$bool) return "<font color=\"#00ff00\"> yes</font>";
 else return 
"<font color=\"#ff0000\"> no</font>";

<p>If you don't see "Yes, it does." in large font above, then PHP is not enabled.</p>

If it returns something like this:

Does PHP work?

Yes, it does. PHP Version 4.4.2

To run the WXGRAPHIC script, you need GD enabled in PHP.
Current GD status:

  • GD support: yes
  • GD Version: 2.0 or higher
  • FreeType Support: yes
  • FreeType Linkage: with freetype
  • T1Lib Support: no
  • GIF Read Support: yes
  • GIF Create Support: yes
  • JPG Support: yes
  • PNG Support: yes
  • WBMP Support: yes
  • XBM Support: no
  • JIS-mapped Japanese Font Support: no

If you don't see "Yes, it does." in large font above, then PHP is not enabled

Then you're good to go with PHP scripts! If, however, it returns something like this:

Does PHP work?

Yes, it does. PHP Version " . phpversion() .""; echo "

To run the WXGRAPHIC script, you need GD enabled in PHP.\n"; echo "
Current GD status:

"; echo describeGDdyn(); // Retrieve information about the currently installed GD library // script by phpnet at furp dot com (08-Dec-2004 06:59) // from the PHP usernotes about gd_info function describeGDdyn() { echo "

  • GD support: "; if(function_exists("gd_info")){ echo "yes"; $info = gd_info(); $keys = array_keys($info); for($i=0; $i
  • " . $keys[$i] .": " . yesNo($info[$keys[$i]]); else echo "
  • " . $keys[$i] .": " . $info[$keys[$i]]; } } else { echo "NO"; } echo "
"; } function yesNo($bool){ if($bool) return " yes"; else return " no"; } ?>

If you don't see "Yes, it does." in large font above, then PHP is not enabled.

Then your current hoster doesn't support PHP, and you should look for a new hoster which does support PHP in order to use these scripts.

References for programmers

When you code, you like to have a few references and sources handy to help the coding project along. The following are my favorite items, which you may find useful.


The Web Design Group offers both HTML 4.0 and Cascading Style Sheet Windows HTML Help, Apple Help files for free. I frequently use the offline versions above to check out the syntax of my code. For final checking, the W3 validators are very useful ( ). An online reference for XHTML 1.0-Strict is also very useful.

JavaScript and DHTML

The JavaScript language offline documentation is hard to find (now that the Netscape source site is decommissioned), but I use the PDF versions of the JavaScript Client Guide and JavaScript Client Reference, which you can download from the links. My favorite DHTML/JavaScript source is

Testing HTML/PHP generated pages and JavaScript

My favorite browser is FireFox V3.5 with it's tabbed window. Two must-have plugins for FireFox are the Web Developer and FireBug tools. Together they provide extensive information on web pages and allow you debug JavaScript interactively. For general use, I found the NoScript, Netcraft, and ForecastFox plugins very useful too. My pages are tested on Internet Explorer 8, Safari (Windows), and Opera 10.


The offline documentation on PHP is excellent from . I use the Windows Extended HTML help version very often! It is packed with user notes and code snippets showing how to use various features, and allows me to stick to a PHP 4.x version feature set for my code.


While the source for Perl documentation is , I like to use an ancient (Perl 4) Windows Help file to just look up the syntax. I don't think it's available any more, but you can download my copy here. For general Perl modules and scripts, the CPAN ( ) is the definitive source.