ASP Classic CAPTCHA Application Config Settings Code Example
The ASP Classic Captcha application config settings code example shows how to configure BotDetect CAPTCHA challenges by overriding Captcha library defaults in application configuration files.
First Time Here?
Check the BotDetect Developer Crash Course for key integration steps.
BotDetect allows user-defined customization of many Captcha options through a special
CaptchaConfig.asp file, which should be placed in the same folder as the
BotDetect.asp include used by your ASP forms.
Captcha settings from this configuration file will apply to all Captcha challenges shown on forms including that particular copy of
BotDetect.asp, and will act as defaults with which all Captcha objects will be created. This makes configuration file settings the simplest and most convenient way of Captcha customization for most use cases.
BotDetect.asp file used in this code example contains detailed descriptions and explanations of the many customizable Captcha options exposed by the BotDetect ASP Captcha configuration API.
By default, the Classic ASP application config settings code example is installed at:
C:\Program Files\Captcha Inc\BotDetect 4 CAPTCHA Component\Asp\WebApp\CaptchaApplicationConfigSettingsExample
You can also run it from the BotDetect Start Menu:
Programs > Captcha Inc > BotDetect 4 CAPTCHA Component > ASP > Web Applications > Run
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><% 'Copyright © Captcha, Inc. (formerly Lanapsoft, Inc.) 2004-2015. All rights ' reserved. 'BotDetect, BotDetect CAPTCHA, Lanap, Lanap CAPTCHA, Lanap BotDetect, Lanap ' BotDetect CAPTCHA, Lanapsoft, Lanapsoft CAPTCHA, Lanapsoft BotDetect, ' Lanapsoft BotDetect CAPTCHA, and Lanap Software are trademarks or registered ' trademarks of Captcha, Inc. %><!-- #include file ="BotDetect\CaptchaIncludes.asp" --><!-- #include file ="BotDetect\CaptchaHandler.asp" --><% ' BotDetect Url prefix (base Url of the BotDetect public resources) Dim BDC_Url_Root : BDC_Url_Root = "BotDetect/Public/" ' process optional config override Dim BotDetect Dim BDC_CurrentCaptchaId Function BDC_GetSettings(CaptchaId) Set BotDetect = New BDC_CaptchaConfiguration BDC_CurrentCaptchaId = CaptchaId Call BDC_ExecuteIfExists("CaptchaConfig.asp") Set BDC_GetSettings = BotDetect Set BotDetect = Nothing End Function ' determine is this file included in a form/class, or requested directly If ("BotDetect" = BDC_ScriptName()) Then ' direct access, proceed as Captcha handler (serving images and sounds) Call BDC_ProcessRequest End If %>