PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview of Captcha control
  • Creating a Captcha control
  • Configuring a Captcha control
  • Handling a Captcha control
  • Implementation and use
  • Process managed by default
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview of Captcha control
The "captcha" are the distorted texts that the Web user must decode and re-enter in a site before validating a form.
The purpose of the "captcha" is to prevent the hackers from attacking a site via a robot that would enter cascading information.
By implementing this type of security in a form, you can be almost sure that the information was entered by a human being!
The principle is straightforward: the Captcha control automatically calculates and displays the distorted image corresponding to a text. This text is automatically generated by the control or defined by the application.
Creating a Captcha control
To create a Captcha control:
  1. In the page editor, click (or select "Insert .. Control .. Captcha control").On the "Creation" pane, in the "Graphic controls" group, click "Captcha".
  2. Click the position where the control will be created in the page. The control appears in creation mode.
To display the control characteristics, select "Description" from the popup menu of control.

Configuring a Captcha control

Several characteristics of the Captcha control can be modified in the editor, in the description window of the control ("Description" from the popup menu of the control).
In the "General" tab, you can define:
  • the number of characters that must be displayed in the Captcha control.
  • the range of authorized characters: lowercase characters and/or uppercase characters and/or digits.
In the "Style" tab, you have the ability to define:
  • the color of captcha.
  • the font used. We recommend that you use simple fonts in order for the captcha to be legible.
Handling a Captcha control

Implementation and use

To use a Captcha control:
  1. Create the Captcha control and modify its characteristics if necessary (font, range of characters, ...). Create an edit control in which the Web user will enter the value of the captcha.
  2. Initialize the Captcha control with the requested value. You can:
    • use CaptchaDisplay. This function is used to generate a random value for the captcha according to the specified parameters.
    • assign a value to the Captcha control via a simple assignment:
      <Name of Captcha Control> = <Captcha Value>

      For example:
      CPTCH_Captcha = "ToTo1567"
    Tip: Depending on the letters and digits used by the captcha, this one may be difficult to decode. Don't forget to create a button used to generate a new captcha upon request. All you have to do is call CaptchaDisplay in the code of button to get a new captcha. You will notice that algorithm used to build the captcha changes for each display, increasing the security level automatically. The distortion changes for each display.
  3. Checks whether the value typed by the Web user corresponds to the Captcha control via CaptchaVerify.
Notes:
Process managed by default
WEBDEV manages the following process by default:
ProcessRuntime condition
Initialization (Server code)Run when opening the page.
Related Examples:
WW_Blog_AWP Complete examples (WEBDEV): WW_Blog_AWP
[ + ] This example is a site for managing blogs.
A blog is a log or a diary on an Internet site.
It can be consulted by everyone and everyone can write comments.
The author of the blog writes his messages whenever he wants to.
You have the ability to format the text, to include images, notes, etc.
This example is based on an AWP generation so that the site can be referenced by all the search engines.
Furthermore, each blog can e exported in RSS. (Use of the RSS types of WLanguage)
The Captcha control Unit examples (WEBDEV): The Captcha control
[ + ] This example explains how to use the "Captcha" control of WEBDEV.
This control allows you to avoid the automatic inputs in the forms.
Minimum required version
  • Version 16
Comments
Click [Add] to post a comment