[thelist] Filename on php/gd-generated images

misterhaan misterhaan at track7.org
Tue May 24 12:29:03 CDT 2005


you can name the script imagename.jpg and tell the server to process it 
as php, or you can use mod_rewrite to make requests for imagename.jpg 
actually call your check.php script

Maximillian Schwanekamp wrote:

> I've a php script (check.php) that generates an image according to 
> query string params using GD, and outputs the image directly to 
> browser with imagejpeg().  Works fine, but I'm wondering if someone 
> can tell me how to set the filename to something other than the 
> calling script when outputting straight to browser.  So if the user 
> saves the image to their local machine, the filename will be 
> "imagename.jpg" (or similar) instead of "check.php".  I'm trying to 
> avoid saving the image to filesystem...


More information about the thelist mailing list