Author Topic: wxgraphic output a gif?  (Read 2343 times)

0 Members and 1 Guest are viewing this topic.

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
wxgraphic output a gif?
« on: March 20, 2009, 01:46:21 PM »
I am happy with my wxgraphic since I created it.  No issues on this forum.  However over on the boltek forum, the IMG tags dont work with it.  I noticed those showing a graphic have theirs as GIF's or JPG's, rather than the php script

It is possible to still use this
Code: [Select]
http://www.mackweather.com/wxgraphic/wxgraphic.phpBut have it also create a GIF (maybe via cron, or other) that resides in image ready format on site?

I did find some reference to something like this in the forum, but it was circa 2006, so not sure what's changed since then...

Thanks
Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline SLOweather

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 3456
    • Weatherelement Moline IL
Re: wxgraphic output a gif?
« Reply #1 on: March 20, 2009, 03:02:07 PM »
In the .htaccess file on your server, put in a line like this

Redirect sig.gif http://httP://www.sloweather.com/sticker/sticker.php?type=banner_big

You can probably make your own .htaccess file with just that entry in it and put it in the root of your web directory.

(assumes a Apache/linux server...)

That tells the server to redirect any incoming request for sig.gif to the URL after it. The calling web page won't know it's really running a script, since it just gets an image back like it asked for.
« Last Edit: March 20, 2009, 03:04:07 PM by SLOweather »

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: wxgraphic output a gif?
« Reply #2 on: March 20, 2009, 03:10:16 PM »
Thanks Chris, I will give it a try tonight.
Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: wxgraphic output a gif?
« Reply #3 on: March 20, 2009, 03:35:26 PM »
tried it from work using godaddy file manager

made a file called  .htaccess
uploaded to \wxgraphic folder

had this code
Code: [Select]
redirect 301 http://www.mackweather.com/wxgraphic/sig.gif http://www.mackweather.com/wxgraphic/wxgraphic.php
tried it without 301, with just sig.gif then a bunch of path specific...?

To test tried to call
http://www.mackweather.com/wxgraphic/sig.gif

Will try at home once I have ftp, but aside from speed, it should have worked...

Andrew


Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
Re: wxgraphic output a gif?
« Reply #4 on: March 20, 2009, 04:25:18 PM »
I just get a page not found warning
Lars Magnusson
Axelvold / Sweden
55° 57' 41" N / 13° 6' 1" E
WX Station: Davis Vantage Pro2 Plus

Offline sam2004gp

  • Mount Crawford, Virginia
  • Forecaster
  • *****
  • Posts: 2865
  • Weeeeeeeee!!!!
    • Mount Crawford Weather, VA
Re: wxgraphic output a gif?
« Reply #5 on: March 20, 2009, 04:26:00 PM »
same here
SAM --->>> http://www.mountcrawfordweather.org
OS WMR-968 with a Dedicated PWS Weather Computer running VWS v13.01 p09


Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: wxgraphic output a gif?
« Reply #6 on: March 20, 2009, 04:41:15 PM »
warning?  I get a "Page not found".

Changed .htaccess to this
Code: [Select]
redirect 301 sig.gif http://www.mackweather.com/wxgraphic/wxgraphic.php
and put in root folder, still get "page not found" for
http://www.mackweather.com/sig.gif

Andrew

I just get a page not found warning

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
Re: wxgraphic output a gif?
« Reply #7 on: March 20, 2009, 05:05:30 PM »
Now it works
Lars Magnusson
Axelvold / Sweden
55° 57' 41" N / 13° 6' 1" E
WX Station: Davis Vantage Pro2 Plus

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: wxgraphic output a gif?
« Reply #8 on: March 20, 2009, 05:28:50 PM »
strange, must be some latency between creating an htaccess file and it actually working.  Lars, thanks for letting me know

Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

 

anything