Currently, the banner does just one banner output.
The banner you are currently using does have a lot of flexibility in it and in fact, I first hacked that script to make it work with Cumulus. However, the current realtime.txt is much less than what that script is capable of supporting so it was easier to just start over.
I have planned on either making the current script output multiple sized banners or simply creating a new script called... avatar.php. In fact, I almost started playing with that last night (its 3:19am here now), I am watching a server that paged me to see if it is okay.
As for using it, it is almost ready to work right out of the box er... download. It is assumed that you have PHP5 and have GD support included otherwise it won't work. You would need to adjust the information header information so that I knows about information that is not contained within the realtime.txt data file like station name, what unit values are used etc...
Code: Select all
############################################################################
# CONFIGURATION INFORMATION
############################################################################
$SITE['version'] = "1.4";
$SITE['hloc'] = "./";
$SITE['datafile'] = "realtime.txt";
$SITE['fontdir'] = "fonts/"; # must contain ttf font files!
$SITE['usettf'] = "yes"; # Set to No to use default fonts
$SITE['format'] = "png"; # Options: jpeg gif png
$SITE['dateiso'] = "no";
$SITE['image_width'] = 468;
$SITE['image_height'] = 60;
$SITE['sitename'] = "Mesa AZ USA - TNET Weather";
$SITE['cumulusver'] = "1.8.2";
$SITE['tempunit'] = "°F";
$SITE['rainunit'] = "in";
$SITE['barounit'] = " mb";
$SITE['windunit'] = " mph";
For most, it doesn't appear to have been too hard to setup especially if you place it in the same directory that the realtime.txt file is located.
Changing the colors, sizes and position, does require some tweaking, but that part is not that dissimilar to the script you are already using.
I think that before I start either adding more formats or creating a new script to do that, I want to come up with some basic functions that make formatting a bit easier. Like the ability to specify flush right, left and center so that changing values remain positioned correctly. There are some functions out there that do that now, I just haven't given them a try yet.
As for your last request... I'm not a flash programmer... though I have started to dabble a bit. I would have a better shot at perhaps an AJAX based web page that does the same.
But before I start down that road, I want to finish the XML stuff as that would then provide a lot more data about the station than just what the realtime.txt file provides. And I currently upload the test XML file once a minute now.
Note that I'm not a big fan of rapid data uploads.... which primarily just show wind changes. I personally, don't have too much time to sit and watch my weather output for hours on end.
Having the XML data available to the banner script would greatly increase the data that could be displayed as well, such as current conditions, historical data like monthly, yearly rain, current cumulus version etc... data that is not contained in the realtime.txt file
I only have so much time to play though...