I have a script that outputs an image.  Using the gd library.  But the only way this 
script gets to execute is if you call it like: 

www.host.com/displayimage.php  

That then sends the content header, and the image.  Obviously I am doing some other 
stuff in there, which is why I am using a script to generate the image.  Is it 
possible somehow to request the file as a .jpg?

www.host.com/displayimage.jpg

Fooling the client into thinking it is just a .jpg image.

I tried changing the .htaccess file for the dir this script was in, so that when a 404 
error is genterated, it redirects to the displayimage.php script.  But its not exactly 
a transparent redirect.  If you type an invalid url it simply redirects, displaying 
the name of the script, displayimage.php while loading the image.

Any suggestions please?

Reply via email to