Hi All,


After having read through everyones posts here is how I actually did it
and its currently running today on a site that gets 2000 new
registrations a day. BTW this will run on CF 4.5 and up:


Create a Java CFX which randomly uses a True Type Font from a zip file
and randomly picks 6 characters to be displayed in a JPEG file. It
writes the image fiel to the filesystem so you can display it on the
page. It also returns (as a coldfusion variable) the six characters that
it has chosen to put in  the image. eg.


<cfx_captcha ivreturnvar="ivString" jpgreturnvar="ivImg">


You then immediately hash the contents of the variable and place it in a
hidden form field


<input type="hidden" name="hashcode" value="#hash( ivString )#">


Then have an input box for the users to type into


<input type="text" name="ivchars" value="" size="6" maxlength="6">


And finally on the page the form posts to you compare the hidden form
field value 'hashcode' to the hash value of whatever the user entered.
If this is the same then they entered the string correctly


if( hash( form_ivchars ) EQ form_hashcode ){
    success = 1;
}


And there you have it. I'll have a word with the powers that be and see
if I can give the source code out. Please don't get your hopes up
though.


Adam Hope
Development Team Leader
Wanadoo UK PLC
www.smartgroups.com

-----Original Message-----
From: Whittingham, P [mailto:[EMAIL PROTECTED]
Sent: 16 June 2004 20:55
To: CF-Talk
Subject: cfmx and CAPTCHA


Hi All,


  How would one provide a cfmx-only solution (no .Net) for a
'CAPTCHA' solution. Any ideas would be appreciated.


http://www.devx.com/dotnet/Article/21308

TIA,
Patrick Whittingham
United Space Alliance

  _____
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to