| Added: December/22/2006 at 12:23pm | IP Logged
|
|
|
(FREE) IMPROVED Captcha Security Image Mod
Today I decided to see if I could get the Version 3 Beta of the captcha code from www.tipstricks.org to work with ASPProtect. After a few minor modifications to the Version 3 Beta code I got it working. Please remember 1st and foremost that the guy at tipstricks.org deservers all credit for this excellent pure ASP code captcha solution. Always go to his site when looking for an unmodified version of his code.

Instructions:
Download the modified version of the Version 3 Beta captcha code here. You must use this version as I had to make some minor changes to make it work. People that haven't been able to get this to work have not been reading these directions very well. Download and use this!! 2006-12-22_121356_modified-captcha-aspprotect.zip
Unzip that download and copy "captcha.asp" into the "users" folder.
Now edit "users/register.asp" with a text editor and add the code shown below in blue. The code to add goes near the bottom of the form right above the submit button. Just add the blue code. The code around it is shown to help you find the area of code where it gets placed.
<tr> <td valign="top" align="right"><font face="Arial" size="2"><strong> Newsletter</strong></font></td> ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; <td valign="top"> <input type="checkbox" name="Newsletter" value="True" checked> <font face="Arial" size="1">Do you want to be subscribed to the newsletter ?</font></td> </tr>
<tr> <td valign="top" align="right"></td> <td valign="top"> <img src="captcha.asp" alt="This Is CAPTCHA Image" /> <font face="Arial" size="2" color="#000000">Type the NUMBERS shown in image for verification.</font><br> <input name="strCAPTCHA" type="text" id="strCAPTCHA" maxlength="8" /></td> </tr>
<tr> <td colspan="2" bgcolor="#FFFFFF"> <p align="center"><input type="submit" value="Register"></p> </td> </tr>
ok, now edit "users/add_new_account.asp" with a text editor and add the code shown below in blue. Just add the blue code. The code around it is shown to help you find the area of code where it gets placed.
If User_Custom6_Used = True Then If User_Custom6_Required = True Then If Custom6 = "" Then ErrorMessage = ErrorMessage & Server.URLEncode("You need to enter a " & User_Custom6_Name &".\n\n") End IF End If End If Function CheckCAPTCHA(valCAPTCHA) SessionCAPTCHA = Trim(Session("CAPTCHA")) Session("CAPTCHA") = vbNullString if Len(SessionCAPTCHA) < 1 then CheckCAPTCHA = False exit function end if if lCASE(CStr(SessionCAPTCHA)) = lCASE(CStr(valCAPTCHA)) then CheckCAPTCHA = True else CheckCAPTCHA = False end if End Function strCAPTCHA = Trim(Request.Form("strCAPTCHA")) If CheckCAPTCHA(strCAPTCHA) = true then else ErrorMessage = ErrorMessage & Server.URLEncode("You did not type in the verification info correctly.\n\n") End If If ErrorMessage <> "" Then Response.Redirect "register.asp?" & Request.Form & "&ErrorMessage=" & ErrorMessage Response.End End If
Your done. You just added a Capcha Security Image to your signup form.
__________________
Best Regards,
Christopher Williams
www.CJWSoft.com
|