Setting resized image to be downloaded
Moderator: General Moderators
Setting resized image to be downloaded
I have created a simple php application that resizes pics.. so this is how the program goes, the server will provide the client an interface where to browse a picture, then after the client chose the pic to be resized it hits on the "RESIZE BUTTON" then the image goes to the server and the server resizes the picture then stores it in a temporary directory.. now the problem is how to set the server to send the resized pic to the client to download.
- greyhoundcode
- Forum Regular
- Posts: 613
- Joined: Mon Feb 11, 2008 4:22 am
Re: Setting resized image to be downloaded
Redirect them to a PHP page which exists purely to serve the image:
They can then right click it and select 'Save image as'
Code: Select all
header('Content-Type: image/jpeg');
readfile('/filepath/resized_image.jpg');