Monday 12-05-2008
About Us | Contact Us | FAQ | Support | Links
Coldfusion Custom Tags, CFXs, CFCs, Full Applications and more!
< Built by ColdFusion Developers, for ColdFusion Developers >
Home | Tag Categories | Latest Tags | Top Rated Tags | Top Selling Tags | My Account | Search | Sell Your Tags | Tags A-Z
CFX_CAPTCHA

CFX_CAPTCHA - CFX_CAPTCHA is a ColdFusion Custom Tag that enables your application create CAPTCHA images.
Developer Name: Philip LaNasa
Company Name: Universal Web Services
Email Developer Email Developer:
Date Created: Wednesday 13/12/2006
Latest Version: 2.0
Price: $15
License: One copy for multiple servers in multiple locations.
Encrypted: No
Average Rating:
Times Rated: 3
Rate This Tag:


Tag Comments

2 tags with the same name
Is this the same tag as is avaiable from emerle.net?

Posted on: Tuesday 13 Feb 2007
By Stephen Muller

 Related ColdFusion Applications
Developers who purchased CFX_CAPTCHA also purchased:
  1. MyAccessAdmin2.0
  2. cfx_Email2Image
  3. Cybersource Merchant Gateway integration (With full source codes)


What Is CFX_CAPTCHA?
CFX_CAPTCHA is a ColdFusion Custom Tag that enables your application create CAPTCHA images. You can provide the text and other options, or let the Custom Tag generate random text for you. A JPEG or PNG file will be output on the file system that you can reference with an HTML tag.

Features

CFX_CAPTCHA 2.0 is packaged with a few additional attributes to help enhance the effectiveness of your CAPTCHA images.  The BLUR, ALPHA, GRID & ROTATION attributes
are available to add layers of protection against increasingly intelligent robots.

EXAMPLES

Basic

<cfx_CAPTCHA OUTPUTFILE = "C:wwwrootmysitecaptcha.jpg">  

<cfset returnText = CAPTCHAText>   <!--- store returned random text --->

<img src="captcha.jpg" />


<cfif form.captcha neq returnText>
  <cfoutput>You did not correctly enter the text in the CAPTCHA image.</cfoutput>
</cfif>

 

Advanced

<cfx_CAPTCHA OUTPUTFILE = "C:wwwrootmysitecaptcha.jpg"
                     TEXT = "Type this"
                     FONTSIZE = "32"
                     FONTFACE = "Arial"
                     FONTCOLOR = "FF0000"
                     FONTSTYLE = "bold"
                     BGCOLOR = "aa0000"
                     GRADIENTBGCOLOR1 = "ff0000"
                     GRADIENTBGCOLOR2 = "770000"
                     ALPHA = "50"
                     BLUR = "true"
                     GRID = "true"
                     GRIDCOLOR = "333333"
                     GRIDSPACING = "25"
                     ROTATION = "3">

<img src="captcha.jpg" />

<cfif form.captcha neq "Type this">
  <cfoutput>You did not correctly enter the text in the CAPTCHA image.</cfoutput>
</cfif>

 

Installing CFX_CAPTCHA

1.) Copy the CAPTCHA.class file into your ColdFusion -> CFX -> java folder. On Windows, this folder is usually located at:
     C:CFusionJavaclasses or C:CFusionMXcfxjava

2.) Go to ColdFusion Administrator in your web browser, then click on CFX Tags (under Extensions)

3.) Click Register Java CFX

4.) For Tag Name, type: CFX_CAPTCHA For Class Name, type: CAPTCHA

5.) Submit Changes

6.) You may need to restart your ColdFusion server for the changes to take effect

 

DOCUMENTATION

Return Variables

CAPTCHAMessage

Contains any errors generated by the tag, or "OK" if everything completed successfully.

CAPTCHAText

Contains the text generated in the CAPTCHA (if text is randomly generated).

 

Syntax

<cfx_CAPTCHA OUTPUTFILE = "string"
                     TEXT = "string"
                     TEXTLENGTH = "integer"
                     FONTFACE = "string"
                     FONTSIZE = "integer"
                     FONTCOLOR = "hexadecimal integer"
                     FONTSTYLE = "string"
                     BGCOLOR = "hexadecimal integer"
                     GRADIENTBGCOLOR1 = "hexadecimal integer"
                     GRADIENTBGCOLOR2 = "hexadecimal integer"
                     ALPHA = "integer"
                     BLUR = "boolean"
                     GRID = "boolean"
                     GRIDCOLOR = "hexadecimal integer"
                     GRIDSPACING = "integer"
                     SWIRL = "integer"
                     ROTATION = "integer">


Note: Make sure that you place quotation marks around all attributes, including integer and boolean attributes.

 

Attributes

OUTPUTFILE
Required. The absolute path to the CAPTCHA image that is output by cfx_CAPTCHA.
Valid File Types: jpeg and png
Unix Example: OUTPUTFILE = "varwwwmysiteimagesmycaptcha.jpg"
Windows Example: OUTPUTFILE = "C:inetpubwwwmysiteimagesmycaptcha.jpg"
 

TEXT
[Default = random]
Optional. The text used to generate the CAPTCHA image.
Example: TEXT = "Type this"

TEXTLENGTH
[Default = 5]
Optional. Used only when TEXT is empty.  The length of the randomly generated text.
Example: TEXTLENGTH = "10"

FONTFACE
[Default = Arial]
Optional. The font face associated with the TEXT.
Note: The availability of font faces will vary depending on your server. Common fonts are Arial, Courier, Times New Roman and Verdana.
Example: FONTFACE = "Times New Roman"

FONTSIZE
[Default = 64]
Optional. The font size associated with the TEXT.
Example: FONTSIZE = "32"

FONTCOLOR
[Default = 555555 (grey)]
Optional. The hexadecimal equivalent of the RGB color associated with the TEXT. If you are unfamiliar with hexadecimal colors, http://www.december.com/html/spec/color.html offers help choosing the right hex value.
Example: FONTCOLOR = "FF0000"

FONTSTYLE
[Default = Plain (no style)]
Optional. The font style associated with the TEXT.
Values: bold, italic, both
Example: FONTSTYLE = "bold"

BGCOLOR
[Default = EEEEEE (light grey)]
Optional. The hexadecimal equivalent of the RGB background color for the CAPTCHA image. If you are unfamiliar with hexadecimal colors, http://www.december.com/html/spec/color.html offers help choosing the right hex value.
Example: BGCOLOR = "FF0000"

GRADIENTBGCOLOR1
[Default = BBBBBB (medium grey)]
Optional. The hexadecimal equivalent of the RGB background gradient starting color.
Example: GRADIENTBGCOLOR1 = "550000"

GRADIENTBGCOLOR2
[Default = EEEEEE (ligh grey)]
Optional. The hexadecimal equivalent of the RGB background gradient ending color.
Example: GRADIENTBGCOLOR2 = "AA0000"

ALPHA
[Default = 100]
Optional. Determines the transparency of the TEXT.  A value of 100 is fully opaque (no transparency).  A value of 0 is completely transparent.
Values: 0 to 100
Example: ALPHA = "50"

BLUR
[Default = false]
Optional. If true, adds a small amount of blur to the TEXT.
Example: BLUR = "true"

GRID
[Default = true]
Optional. Determines whether or not to add a grid of lines to the CAPTCHA image.
Example: GRID = "false"

GRIDCOLOR
[Default = 000000 (black)]
Optional. The color of the lines that make up the grid.  Only applies if GRID is set to true.
Example: GRIDCOLOR = "AA00BB"

GRIDSPACING
[Default = 15]
Optional. Determines the spacing (in pixels) between adjacent lines in the grid.  Only applies if GRID is set to true.
Example: GRIDSPACING = "25"

SWIRL
[Default = 0]
Optional. Determines the amount of swirl applied to the TEXT.  Use this attribute with caution. 
Due to the complex rendering algorithm applied, the resulting image may sometimes be difficult to read if the FONTSIZE is larger than 64 or the length of the text is longer than 8 characters.
Values: 0 to 4
Example: SWIRL = "2"

ROTATION
[Default = -5]
Optional. The amount of rotation (in degrees) to apply to the TEXT.
Values: -5 to 5
Example: ROTATION = "3"



 


< Business Strength Coldfusion Custom Tags >
Sitemap | Privacy | Branding | Web Services | Support | Contact Us
PageCLixUid