Click here to Skip to main content
15,899,313 members
Articles / All Topics

Options: Configure BotDetect Captcha on Your Website

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
20 May 2014CPOL1 min read 10.1K   4  
Options: Configure BotDetect Captcha on your website

In my last post, I discussed how you can add captcha to your website in just 5 minutes. In this post, we will see what options are available for you to customize the captcha. BotDetect provides a long set of options to customize your captcha. Few of the options are listed below:

  • Locale – You can set the locale of the characters seen in captcha to different locales such as:
    • en-CA
    • en-US
    • en-UK
    • es
    • en-IN
    • hi – For displaying Captcha in Hindi
    • he – For hebrew characters
  • CodeLength – The number of characters displayed in the Captcha Image. The range is between 1 to 15 characters and the default value is 4-6.
  • CodeStyle – This property allows you to display alphanumeric, alphabet only or numeric only captchas. Valid values are:
    • Alphanumeric
    • Numeric
    • Alpha
  • ImageStyle – BotDetect provides more than 50 different styles of the characters displayed in captcha. Some of them are:
    • Bubbles
    • Bullet
    • Chess
    • Collage
    • Corrosion
    • Darts
    • Distortion
    • FingerPrints
    • Wave
  • ImageFormat – The format of the image rendered on the website for captcha. Valid values are Jpeg, Png, Gif & Bmp
  • ImageSize – The size of the image
  • SoundStyle – Type of sound played on clicking the Sound button beside the captcha. You can choose from a set of 10 predefined sound tracks

Below is a sample code that applies the above properties to a captcha control named “captchaBox”.

C#
captchaBox.Locale = "en-US";
captchaBox.CodeLength = 4;
captchaBox.CodeStyle = BotDetect.CodeStyle.Alphanumeric;
captchaBox.ImageStyle = BotDetect.ImageStyle.Fingerprints;
captchaBox.ImageFormat = BotDetect.ImageFormat.Png;
captchaBox.ImageSize = new System.Drawing.Size(275, 50);
captchaBox.SoundStyle = BotDetect.SoundStyle.Radio;

Click here for a full featured demo. Keep learning and sharing! Cheers!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder Rebin Infotech
India India
A passionate developer with over 10 years of experience and building my software company code by code. Experience withMS Technologies like .Net | MVC | Xamarin | Sharepoint | MS Project Server and PhP along with open source CMS Systems like Wordpress/DotNetNuke etc.

Love to debug problems and solve them. I love writing articles on my website in my spare time. Please visit my Website for more details and subscribe to get technology related tips/tricks. #SOreadytohelp

Comments and Discussions

 
-- There are no messages in this forum --