|
-
Nov 23rd, 2008, 05:42 PM
#1
Thread Starter
Fanatic Member
[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?
-
Nov 23rd, 2008, 06:02 PM
#2
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)
-
Nov 26th, 2008, 06:19 AM
#3
Re: How can i use a captcha on my page
-
Nov 30th, 2008, 02:30 PM
#4
Hyperactive Member
Re: How can i use a captcha on my page
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
%>
Did I help you with your problem? If I did rate me by clicking here: Rate knxrb

-
Dec 8th, 2008, 07:52 PM
#5
Thread Starter
Fanatic Member
Re: How can i use a captcha on my page
 Originally Posted by knxrb
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.

How can i fix this?
-
Dec 9th, 2008, 05:20 AM
#6
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?
-
Dec 9th, 2008, 05:26 AM
#7
Hyperactive Member
-
Dec 9th, 2008, 08:27 AM
#8
Thread Starter
Fanatic Member
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.
-
Dec 9th, 2008, 08:30 AM
#9
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|