Author Topic: firedangerWD.php script  (Read 343 times)

0 Members and 1 Guest are viewing this topic.

Offline SoMDWx

  • Forecaster
  • *****
  • Posts: 1019
    • Southern Maryland Weather
firedangerWD.php script
« on: February 05, 2020, 08:06:39 AM »
Good morning all!

I was wondering if anyone knows how to crate a GIF image and store it to a file rather than having the script display the image when called...

I would like to have a physical file created from the image...

Thanks!

Jim

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: firedangerWD.php script
« Reply #1 on: February 05, 2020, 08:53:30 AM »
As I recall, you're fairly handy at scripting, so this 'heavens.php' contains an example of just this sort of manipulation.

You can follow this variable to see what happens to it:
Code: [Select]
$pc_cacheFile = './cache/heavenpie.png'; // Relative path and name of cached image file

You can save the image in different formats, gif, png, or jpg by using the appropriate php function: imagegif(...), imagepng(...), or imagejpeg(...).

Hope this helps.

BTW, with 'firedangerWD.php' I've taken the opposite approach by using AJAX to update the image on my alternate dashboard in real time.
« Last Edit: February 05, 2020, 08:59:28 AM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

 

anything