Weather Software > GRLevel X Software
Using PHP to add local timestamp to GRLevelx images
(1/1)
carterlake:
Mike mentioned something months ago when we were going through the crisis with the NOAA servers....
He mentioned where the files were located.
In those files is a TIMESTAMP! in text.
Hello PHP.
Pull timestamp... reformat to my time... and VOILA! timestamp in local time.
This is my current set of code which... will take the current radar image and add the current image time and re-display the image. It does this by covering the tilt information with a color-adapting rectangle (it will act like a chameleon, changing color with the background). Then it uses a custom font (enclosed) to display the new time.
http://www.carterlake.org/radar/koax_br248.jpg
Becomes...
http://www.carterlake.org/addtimetoradar.php
Get the code and font here:
http://members.cox.net/carterlakeweather/addtimetoradar.zip
(Special thanks to SLOweather for the color changing idea!)
SLOweather:
--- Quote from: "carterlake" ---
(Special thanks to SLOweather for the color changing idea!)
--- End quote ---
You're welcome! I knew someone would put that to good use.
PSJohn:
how do I incorporate this code into my page? Do I use a "PHP Include" statement?
EDIT: I have the original image on my homepage http://www.desertweather.com/, and a copy of the code working at http://www.desertweather.com/addtimetoradar.php
to clarify... need to incorporate addtimetoradar.php into my homepage
carterlake:
--- Quote from: "PSJohn" ---how do I incorporate this code into my page? Do I use a "PHP Include" statement?
EDIT: I have the original image on my homepage http://www.desertweather.com/, and a copy of the code working at http://www.desertweather.com/addtimetoradar.php
to clarify... need to incorporate addtimetoradar.php into my homepage
--- End quote ---
It's an image... you just need to use the <img> tags as with any image.
PSJohn:
works! thank you very much!!!
Navigation
[0] Message Index
Go to full version