Quick hit blog post here, did you know that ColdFusion can generate CAPTCHA images for you? While there are, of course, other CAPTCHA image generators & frameworks out there, if you’re just looking for a simple solution, you’ve already got one built in to CF.
Consider the following code:
<cfscript>
cfimage(action=”captcha”, text=”OMGWHAT”, difficulty=”medium”, fontSize=”18″);
</cfscript>
This code would generate a randomly styled CAPTCHA image, similar to this:
ColdFusion supports different difficulties, font-sizes and fonts, and of course you can dynamically generate the CAPTCHA text yourself to check against a server variable to help prevent bots from posting to your forms.
Of course, the cfimage() function can also add borders to images, convert them to different formats, resize them, rotate them and much more.
Get more info & learn what else this function can do here: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-i/cfimage.html
You must be logged in to post a comment.