This script is a very easy to use multifunction image handler script for your weather web site. The caching feature makes it the perfect solution to gracefully "hot link" an image from another web site. Note: Please use common courtesy... get permission to use the image you will download and display.
Some of the many features include:
- Supports .jpg .gif and .png, download an image, cache the image, display the image
- Supports remote images or local images on your web server
- Convert the image type(optional)
- Crop the image(optional)
- Resize the image(optional)
- Resize the image preserving aspect ratio(optional)
- Jpeg compression(optional)
- Annotate text on the image, add up to 3 text overlays(optional)
- Multi line text support(optional)
- Text alignment options(optional)
- Text margin options(optional)
- Text color options(optional)
- Auto archive/rotate images with or without thumbs, this feature can be utilized for web cam image archiving(optional)
- Outputs most errors as an image with error code.
Why use it?
The built in caching feature reduces bandwidth consumption that can annoy webmasters. Even when you have permission to "hot link" to another site's image, if your site generates too many requests for the image, they may get annoyed and tell you to stop. This script will considerably lighten the bandwidth consumption load. It can also automatically reduce image size so any image you want to include on your web site will fit properly.
How I use it?
I use this script to make a text overlay on my Long Beach, WA Web Cam image. I use it to make a small thumbnail image of of my web cam image for a link on my weather page. It even puts the words "Live Cam" on it. I also use this script to download, cache, resize, and display the 5 images on my Space Weather page.
See the live demo of the Multifunction Image Handler below. You can select the text position, font size, and image resize options. These are just a few of the features selected here for the demo. Click 'Generate Image' to see the results.
How to use it?
Just download the file, adjust a few settings at the top, upload it to your web server, and link to the file like you would an image. Please refer to the "How to use it" section at the top of the script source code for all the details.
Sites using my Image Handler Script:
- Central Iowa Weather, IA
- Walker, Michigan (near Grand Rapids) Weather, MI
- McGee's Crossroads Weather, NC
- Branford Weather, CT
- South Erin Weather, NY
- De Soto Valley Weather, WI
- Weatherstation/Wetterstation Halikko, FI
- Meteo Aerolugo, Spain
This php code provided "as is," and Long Beach Weather (Michael Challis) disclaims any and all warranties, whether express or implied, including (without limitation) any implied warranties of merchantability or fitness for a particular purpose. Use of this code signifies your acceptance.