praveenjayapal
praveenjayapal

Reputation: 38529

Javascript for image captcha in html

I want javascript for Image captcha in html code.
Whcih generates images dynamically and match the given character with image characters. Before entering into the new page it should have to check whether both are same or not
I want to create it in my own, How i can achieve it?

Thanks in Advance,
Praveen J

Upvotes: 1

Views: 4094

Answers (2)

bobince
bobince

Reputation: 536329

I want javascript for Image captcha in html code. Whcih generates images dynamically and match the given character with image characters. Before entering into the new page it should have to check whether both are same

Whilst you could conceivably write some shapes to a <canvas>, SVG or VML element — or even (on non-IE browsers) create an image with a ‘data:’ URL created from pixel values —  there is no point.

Any wholly client-side approach to captcha is already compromised because it needs to know the ‘right’ answer to check against. An attacker can just run the JavaScript themselves to find out the answer. Or just turn JavaScript off to avoid the checks.

To do captchas you need server-side scripting, which the attacker does not have access to, to do the work.

Upvotes: 4

i_am_jorf
i_am_jorf

Reputation: 54600

Use recaptcha. It's what stackoverflow uses!

Upvotes: 4

Related Questions