Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Link to image download
10-23-2011, 08:30 PM #1
- Join Date
- Sep 2011
- Thanked 1 Time in 1 Post
Link to image download
Okay, I suppose this is something about the page headers but I weren't quite sure where to put this topic.
I have a PHP script that generates a picture - this picture can only be accessed by linking to the script with the <img> tag.
The problem here lies in 2 places: Browser compatibility and Page Header...
I could live with a solution that let people right click the image and save it to their computer - but Chrome (Probably others too) users just get the result HTML from my script (Which would be empty).
So if I could set the page header of the script to something else, so when you are sent to the script it will begin downloading the jpg file...
Right now, I just use the header "Content-type:image/jpeg"...
EDIT: I just realised this would fit better into the PHP category :S