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?
Printable View
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?
Thread moved from CodeBank forum (which is for you to post your code examples, not questions)
ASP or ASP.NET?
http://www.tipstricks.org/
http://www.u229.no/stuff/Captcha/
Here's what I use, it's not very secure at all!
1) Code:
<% Dim strCaptcha, pChar, pCount pChar = "0123456789" pCount = Len(pChar) Randomize For i = 1 To 5 strNumber = Mid(pChar, 1 + Int(Rnd * pCount), 1 ) strCaptcha = strCaptcha & strNumber response.write("<img src='images/numbers/" & strNumber & ".gif' />") Next session("captcha")=strCaptcha %>
With your coding i am getting output like this.Quote:
Originally Posted by knxrb
Attachment 67872
How can i fix this?
Have you created the image files (1.gif to 9.gif), and stored them in the relevant folder?
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:
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.
Have you looked at post #3?