Download the PHP package friendlycaptcha/sdk without Composer
On this page you can find all versions of the php package friendlycaptcha/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download friendlycaptcha/sdk
More information about friendlycaptcha/sdk
Files in friendlycaptcha/sdk
Package sdk
Short Description Serverside SDK for the Friendly Captcha API.
License MIT
Informations about the package sdk
friendly-captcha-php
A PHP client for the Friendly Captcha service. This client makes it easy to connect to the Friendly Captcha API for captcha verification or Risk Intelligence retrieval.
Note, this is for Friendly Captcha v2 only.
Installation
Requires PHP 7.1 or later.
Install using Composer
Usage
Below are some basic examples that demonstrate how to use this SDK.
For complete examples, take a look at the examples directory.
Initialization
Verifying a Captcha Response
Retrieving Risk Intelligence
You can retrieve Risk Intelligence data using a token. This data provides detailed information about the risk profile of a request, including network data, geolocation, browser details, and risk scores.
Development
Make sure you have PHP installed (e.g. with brew install php on a Macbook).
Install Composer
Install dependencies
Run the tests
First download the friendly-captcha-sdk-testserver for your operating system.
Then open a new terminal, and run the following
You should then see output like the following
Optional
To make sure that the SDK is backwards compatible, make sure the tests pass in PHP 7.1. We recommend using Docker.
Then follow the steps above starting with Install Composer. You can run ./friendly-captcha-sdk-testserver serve outside the Docker container.
Some features you can't use to be compatible with PHP 7.1
- Typings of class member variables.
- Union types (outside of comments).
License
Open source under MIT. Contributions are welcome!