LanapBotDetect::CodeTypeEnum Reference
LanapBotDetect::CodeTypeEnum contains all valid values of the LanapBotDetect component's CodeType property. It represents the type of code rendered in CAPTCHA images and spoken in the audio CAPTCHAs.
- CodeTypeEnum Members
- CodeTypeEnum Default
- CodeTypeEnum Usage
- CodeTypeEnum Notes
- CodeTypeEnum Screenshots
Members
[VB] Public Enum CodeTypeEnum AlphaNumeric = 0 Alpha = 1 Numeric = 2 End Enum
[C++]
typedef enum CodeTypeEnum
{
AlphaNumeric = 0,
Alpha = 1,
Numeric = 2
} CodeTypeEnum;
Default value
If the CodeType property is not set, 0 (AlphaNumeric) is used by default.
Usage
[ASP] ' Assume we are using the LanapBotDetectHandler.asp helper ' Example 1: simple assignment <img src= "LanapBotDetectHandler.asp?Command=CreateImage&CodeType=1" alt="CAPTCHA image" /> ' Example 2: randomization <% Dim codeType Randomize codeType = CInt( 2 * Rnd() ) %> <img src= "LanapBotDetectHandler.asp?Command= CreateImage&CodeType=<%=codeType%>" alt="CAPTCHA image" />
Direct access examples:
[VB]
Set objCaptcha = CreateObject("Lanap.BotDetect")
objCaptcha.CodeType = 1
[PHP]
$objCaptcha = new COM('Lanap.BotDetect');
$objCaptcha->CodeType = 1;
[Ruby]
require 'win32ole'
objCaptcha = WIN32OLE.new('Lanap.BotDetect')
objCaptcha.CodeType = 1
Notes
To improve user-friendliness, the CodeTypeEnum::AlphaNumeric code generation algorithm doesn't use the full range of available characters, but excludes some easily confused character pairs - for example, '1', 'I', '7', 'L', '0', 'O', '5' and 'S' are not used.
Screenshots
(Using the "Strippy" Text Style)
Alpha
Numeric
AlphaNumeric