BotDetect CAPTCHA Crash Course (BotDetect v3.0; deprecated)

On this page we demonstrate how easy it is to integrate BotDetect Captcha in your forms.

We'll use default BotDetect settings; to see how powerful and customizable BotDetect is, check the BotDetect features demo.

1. Copy Captcha Library Files

Copy BotDetect.asp and the BotDetect folder to your application. These files (and a code sample made by following these instructions, named "Basic CAPTCHA sample") are included in the BotDetect installation.

2. Show a Captcha Challenge on the Form

On the ASP Classic form you want to protect against bots, add:
  <!-- #include file ="BotDetect.asp" -->
</head>

  […]

<% ' Adding BotDetect Captcha to the page 
  Dim SampleCaptcha : Set SampleCaptcha = (New Captcha)("SampleCaptcha")
  SampleCaptcha.UserInputID = "CaptchaCode"
  Response.Write SampleCaptcha.Html
%>

<input name="CaptchaCode" id="CaptchaCode" type="text" />

3. Check User Input During Form Submission

When the form is submitted, the Captcha validation result must be checked:
<% If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
  
  ' validate the Captcha to check we're not dealing with a bot
  Dim isHuman : isHuman = SampleCaptcha.Validate()
  
  If Not isHuman Then 
    ' TODO: Captcha validation failed, show error message
  Else 
    ' TODO: captcha validation succeeded; execute the protected action
  End If 
  
End If %>

BotDetect CAPTCHA Options

To find more about configuring BotDetect and integrating it in various usage scenarios, please check the getting started with BotDetect Captcha page.

Please Note

The information on this page is out of date and applies to a deprecated version of BotDetect™ CAPTCHA (v3.0).

An up-to-date equivalent page for the latest BotDetect Captcha release (v4) is BotDetect v4 Captcha documentation index.

General information about the major improvements in the current BotDetect release can be found at the What's New in BotDetect v4.0 page.