BotDetect CAPTCHA jQuery Plugin: Simple API integration for jQuery 1/2/3+
For a comprehensive step-by-step integration guide please see our jQuery Captcha Plugin Integration Guide.
The guide covers the integration with the following backends:
- ASP.NET (Core): web API with MVC Core
- ASP.NET (Legacy): Web-API2, MVC1-5, Generic Handler
- Java: Servlet, Spring, Struts
- PHP: the plain PHP
To give you a hint how jQuery Captcha Plugin works we pasted bellow a few, not necessary up-to-date (and mostly frontend related), excerpts from the Integration Guide.
Quick guide:
1) jQuery Captcha Plugin Installation
npm install jquery-captcha --save
2) Include jQuery Captcha Plugin in Your App
3) Load jQuery Captcha Plugin in Your App, and Configure Backend Captcha Endpoint
Endpoint configuration depends on which technology you use in the backend.
- ASP.NET-based captcha endpoint:
;
- Java-based captcha endpoint:
;
- PHP-based captcha endpoint:
;
4) Display Captcha In Your View
5) Captcha Validation: Client-side Code
;
6) Captcha Validation: Server-side Code
The userEnteredCaptchaCode
and captchaId
values posted from the frontend are used to validate a captcha challenge on the backend.
The validation is performed by calling the: Validate(userEnteredCaptchaCode, captchaId)
.
- Server-side captcha validation with ASP.NET Captcha on backend is executed in the following way:
// C#SimpleCaptcha yourFirstCaptcha = new SimpleCaptcha();bool isHuman = yourFirstCaptcha.Validate(userEnteredCaptchaCode, captchaId);
' VB.NETDim yourFirstCaptcha As SimpleCaptcha = New SimpleCaptcha()Dim isHuman As Boolean = yourFirstCaptcha.Validate(userEnteredCaptchaCode, captchaId)
- Server-side captcha validation with Java Captcha on backend is executed in the following way:
SimpleCaptcha yourFirstCaptcha = SimpleCaptcha.;boolean isHuman = yourFirstCaptcha.;
- Server-side captcha validation with PHP Captcha on backend is executed in the following way:
$yourFirstCaptcha = new SimpleCaptcha();$isHuman = $yourFirstCaptcha->Validate($userEnteredCaptchaCode, $captchaId);
Documentation:
-
jQuery Captcha Plugin Step-by-step Integration Guide -- read this one first
-
jQuery Captcha Plugin Basic Example -- partial code walk-through
-
jQuery Captcha Plugin Form Example -- partial code walk-through
Dependencies:
The current version of the jQuery Captcha Plugin requires one of the following BotDetect CAPTCHA backends:
Technical Support:
Through contact form on captcha.com.