Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
ASPProtect Full 7.x (Mods, Updates, Add On's)
 CJWSoft Support Info : ASPProtect Full 7.x (Mods, Updates, Add On's)
Subject Info: (FREE) IMPROVED Captcha Security Mod A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: December/22/2006 at 12:23pm | IP Logged Quote cwilliams

(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">&nbsp;<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
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area


Active Server Pages asp search engine active server page asp application components tutorial CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.powerasp.com,www.aspclassifieds.com,www.aspphotogallery.com,www.codewanker.com