Author Topic: Using PHP to add local timestamp to GRLevelx images  (Read 7328 times)

0 Members and 1 Guest are viewing this topic.

Offline carterlake

  • Senior Contributor
  • ****
  • Posts: 243
    • CarterLake.org
Using PHP to add local timestamp to GRLevelx images
« on: August 30, 2007, 08:06:08 PM »
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!)

Davis VP2 6153; Weather Display (LIVE w/ Ajax); Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; live NOAA Radio

Offline SLOweather

  • Administrator
  • Forecaster
  • *****
  • Posts: 3457
    • http://www.sloweather.com
Re: Using PHP to add local timestamp to GRLevelx images
« Reply #1 on: August 30, 2007, 10:05:28 PM »
Quote from: "carterlake"


(Special thanks to SLOweather for the color changing idea!)


You're welcome! I knew someone would put that to good use.

Offline PSJohn

  • Senior Contributor
  • ****
  • Posts: 156
    • DesertWeather.com
Re: Using PHP to add local timestamp to GRLevelx images
« Reply #2 on: September 01, 2007, 03:12:30 PM »
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
John Slama
Palm Springs, California
Davis Vantage Pro 2, FARS

Offline carterlake

  • Senior Contributor
  • ****
  • Posts: 243
    • CarterLake.org
Re: Using PHP to add local timestamp to GRLevelx images
« Reply #3 on: September 01, 2007, 05:20:09 PM »
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


It's an image... you just need to use the <img> tags as with any image.

Davis VP2 6153; Weather Display (LIVE w/ Ajax); Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; live NOAA Radio

Offline PSJohn

  • Senior Contributor
  • ****
  • Posts: 156
    • DesertWeather.com
Re: Using PHP to add local timestamp to GRLevelx images
« Reply #4 on: September 01, 2007, 05:27:06 PM »
works! thank you very much!!!
John Slama
Palm Springs, California
Davis Vantage Pro 2, FARS

 

anything