Linux.com

Re:Filenames on the Fly

Posted by: Anonymous Coward on October 20, 2006 09:15 PM
The PHP/PEAR package Text_CAPTCHA <a href="http://pear.php.net/manual/en/package.text.text-captcha.php" title="php.net">http://pear.php.net/manual/en/package.text.text-c<nobr>a<wbr></nobr> ptcha.php</a php.net> does something like this, ensuring unique image names by hashing the session ID as in
md5(session_id()) . '.png'
The image is deleted on validating the CAPTCHA. However, I wonder what happens to CAPTCHAs which never get validated because the form wasn't submitted. Also, the CAPTCHA_test.php example in the package adds a timestamp to the SRC attribute of the image, as in 4b9b92da1c76ee5ac9ade60b5447514c.png?1161349897 for linking to the image 4b9b92da1c76ee5ac9ade60b5447514c.png. I'd appreciate if anyone could explain these two issues for me.

#

Return to CAPTCHA your blog comments with FOSS utilities