Results 1 to 9 of 9

Thread: [RESOLVED] How can i use a captcha on my page

  1. #1

    Thread Starter
    Fanatic Member bharanidharanit's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    673

    Resolved [RESOLVED] How can i use a captcha on my page

    Hello sir,
    I am using ASP. In register page, it want to ask for captcha code while registering. (captcha must be random)

    Can anyone help me in this coding?

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: How can i use a captcha on my page

    Thread moved from CodeBank forum (which is for you to post your code examples, not questions)

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How can i use a captcha on my page


  4. #4
    Hyperactive Member knxrb's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    321

    Re: How can i use a captcha on my page

    Here's what I use, it's not very secure at all!

    1) Code:
    1. <%
    2.      Dim strCaptcha, pChar, pCount
    3.      pChar = "0123456789"
    4.      pCount = Len(pChar)
    5.      Randomize
    6.      For i = 1 To 5
    7.      strNumber = Mid(pChar, 1 + Int(Rnd * pCount), 1 )
    8.      strCaptcha = strCaptcha & strNumber
    9.      response.write("<img src='images/numbers/" & strNumber & ".gif' />")
    10.      Next
    11.      session("captcha")=strCaptcha
    12. %>
    Did I help you with your problem? If I did rate me by clicking here: Rate knxrb

  5. #5

    Thread Starter
    Fanatic Member bharanidharanit's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    673

    Re: How can i use a captcha on my page

    Quote Originally Posted by knxrb
    Here's what I use, it's not very secure at all!

    1) Code:
    1. <%
    2.      Dim strCaptcha, pChar, pCount
    3.      pChar = "0123456789"
    4.      pCount = Len(pChar)
    5.      Randomize
    6.      For i = 1 To 5
    7.      strNumber = Mid(pChar, 1 + Int(Rnd * pCount), 1 )
    8.      strCaptcha = strCaptcha & strNumber
    9.      response.write("<img src='images/numbers/" & strNumber & ".gif' />")
    10.      Next
    11.      session("captcha")=strCaptcha
    12. %>
    With your coding i am getting output like this.
    Name:  captcha.bmp
Views: 388
Size:  180.2 KB
    How can i fix this?

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: How can i use a captcha on my page

    Have you created the image files (1.gif to 9.gif), and stored them in the relevant folder?

  7. #7
    Hyperactive Member knxrb's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    321

    Re: How can i use a captcha on my page

    Like si_the_geek said, you need to either draw or get some number images and put them in the 'images/numbers' folder.
    Here's some images if you want them:
    Attached Files Attached Files
    Did I help you with your problem? If I did rate me by clicking here: Rate knxrb

  8. #8

    Thread Starter
    Fanatic Member bharanidharanit's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    673

    Re: How can i use a captcha on my page

    But the captcha appears very easily to type by the user. Can i able to make it more difficult like captcha asked during registration in yahoomail.

  9. #9
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: How can i use a captcha on my page

    Have you looked at post #3?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width