The call to imagejpeg, if it doesn't include a filename parameter, will simply output the content of the image in binary to the client. If you tell the client to expect an image as a file attachment, it'll trigger the download you want.
As far as redirecting the browser, I think what you actually need to do is redirect the client before you present the download. Once you give them the download, your php control has pretty much ended.
Main Topics
Browse All Topics





by: marchentPosted on 2009-03-28 at 00:11:01ID: 24007526
http://icfun.blogspot.com/ 2009/03/ph p-resizing -image-usi ng- php-gd. html