PHP
The following tutorial will show you how to integrate Trustcaptcha into PHP.
Preparation
The following preparations should be made before you start implementing Trustcaptcha in your Python project.
Requirements
- An account with Trustcaptcha and an existing CAPTCHA.
- A project with PHP, into which Trustcaptcha is to be integrated.
Knowledge (recommended)
- Basic knowledge in PHP.
- Understanding of the basic functionality of Trustcaptcha as well as the backend process.
Add Dependency
To use the Trustcaptcha library, you must first insert the corresponding dependencies into your project.
Composer
Install the Trustcaptcha library using Composer.
Use Library
Below you will find out how you can use the library.
Fetch Result
You can retrieve the verification result using the getVerificationResult() method of the CaptchaManager class from our servers. For this, you must provide your secret-keyue and the verification token.
Use Result
Once you have successfully retrieved the verification result, you can plan your next steps based on it. A concrete overview of all the information contained in the verification result and their respective meanings can be found in The Backend.
Example with PHP
The example below shows a possible implementation with PHP.
The entire example including source code can be found on Github.