It is a reworking of the code I use on this site to output my Captcha images, into a nice CFC that has two public methods -
- captchaToFile(…) – This method writes a Captcha image defined by the arguments passed in to the file you tell it to set.
- captchaToBinary(…) – This returns binary data that can be used by cfcontent to display the generated image on the fly.
The code here is pretty much 'as is'. The CFC should be relatively self explanatory, but I have provided examples in the zip file on how to use the CFC both ways.
If you have any feedback, feel free to send me an email .