| 4:02 pm on Apr 15, 2007 (gmt 0)|
There is the data uri scheme [en.wikipedia.org] but it's not supported by IE.
| 4:13 pm on Apr 15, 2007 (gmt 0)|
I'm afraid I don't have an actual answer to your main query. I can address one bit of your post though. :)
|An added advantage this might have would be I might not have to worry about the browser chaching the image. |
You can add headers to your captcha-generating PHP file to prevent caching (in most cases).
This thread [webmasterworld.com] has an example of how to achieve this plus a search at your favorite search engine for "php header prevent caching" should turn up plenty of results.
| 4:48 pm on Apr 15, 2007 (gmt 0)|
Its a shame its not fully supported, that would have been exactly what I was looking for. Thanks for the information though.
Also, thanks for the tip about the headers. I currently do use headers to prevent caching, but this would have made them obsolete.
| 5:01 pm on Apr 15, 2007 (gmt 0)|
One other possibility (maybe a long shot) is HTML Table images [neil.fraser.name] with a lower resolution to help with loading time.
[edited by: Little_G at 5:02 pm (utc) on April 15, 2007]
| 7:14 pm on Apr 15, 2007 (gmt 0)|
|My site uses dynamic png images which I create using PHP to verify that a human is inputing data into a form. Right now I have traditionaly link to these images (php pages) and the requested file gives a png header and the image source code. |
I think I get where you're going - for security possibly?
What you can do is create a second script, call it an "image generator." Then do
img_gen.php would have to slurp up the file and output a content-type:image/png header (wild guess, you get the idea) and dynamically output the image.
If it's just caching you're worried about, generate a unique id for each image file name before output:
| 7:51 pm on Apr 15, 2007 (gmt 0)|
|If it's just caching you're worried about, generate a unique id for each image file name before output: |
You may also add this to some_image.php so that a different filename is sent everytime to the browser:
header('Content-Disposition: filename=' . mt_rand(0, 9999) . '.png');