Weathergraphs.php - Weather Graphs made on the fly by PHP
Please introduce your project.
What does it do?
Copyright 2004 by Kenneth Lavrsen
This program is published under the GNU public license version 2.0 or later.
Please read the file 'COPYING' for more info.
All the hard work with the graphs were done by Herman Veluwenkamp by using his PHP Graph class.
Default values have been modified for the Weathergraphs program.
The original class can be downloaded from http://www.phpclasses.org/browse/package/176.html
See Install for how to install this package.
Works with open2300.
This is the first ever related project and as an exception it is hosted at Sourceforge.
These program assumes that you have the open2300 software installed for your WS2300 weather station.
You need a webserver with a recent version of PHP including graphical library GD.
A cronjob must fetch data from the station for example every 10 minutes
In /etc/crontab add this line (assuming that log2300 is installed in /usr/local/bin)
0-59/10 * * * * root /usr/local/bin/log2300 /usr/local/apache2/htdocs/weather_log.log
This adds a line of data to /usr/local/apache2/htdocs/weather_log.log every 10 minutes. Make sure that the file is world readable.
Place all the files from this package in a directory on your web server.
Edit all the .php files so that the line..
..is changed to the real place where you have your weather_log.log file.
That should be it.
The file weathergraphs.php shows all the possible graphics.
You can include just one or a few using this format in a .php file.
<img src="tempout.php" height=400 width=640>
The code should be defunctionalized. I suggest to have one single class that generates all diagrams. Also a config file should be supported.
I have started working on that. Still I have problems with GD
- 28 Dec 2005
I'd suggest, if anyone ever gets round to developing a config file, some way to switch the wind speed graph between m/h, km/h, and m/s. in the meantime does anyone have any ideas how it could be achived easily.
- 20 Jul 2008