Download the PHP package fsorge/cloudflare-turnstile-php without Composer
On this page you can find all versions of the php package fsorge/cloudflare-turnstile-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download fsorge/cloudflare-turnstile-php
More information about fsorge/cloudflare-turnstile-php
Files in fsorge/cloudflare-turnstile-php
Download fsorge/cloudflare-turnstile-php
More information about fsorge/cloudflare-turnstile-php
Files in fsorge/cloudflare-turnstile-php
Vendor fsorge
Package cloudflare-turnstile-php
Short Description Validate Cloudflare Turnstile captchas with ease
License MIT
Package cloudflare-turnstile-php
Short Description Validate Cloudflare Turnstile captchas with ease
License MIT
Please rate this library. Is it a good library?
Informations about the package cloudflare-turnstile-php
Cloudflare Turnstile
An unofficial PHP package to validate Cloudflare Turnstile captchas with ease. Read more at the Cloudflare official documentation.
Requirements
- PHP >= 8.1
Getting started
-
Download this package with Composer
-
Create a new
Turnstile
instance -
Call the
isValid()
method - That's it!
Dictionary
- YOUR_SECRET_KEY: you can retrieve your secret key by going to your Cloudflare Turnstile dashboard, clicking "Settings" on your website, expanding the "Secret key" section and copying the key somewhere in your project and passing it to the
Turnstile
constructor - RESPONSE_FROM_CLIENT: it's a hidden field (with the
name
attribute set tocf-turnstile-response
) that the Turnstile client-side widget automatically creates in your form. You have to pass that field's value.
Full simple example
Detailed response
If you need to have the full response from the Cloudflare Turnstile API, you can call the validate()
method instead of the isValid()
.
validate()
returns an associative array with the whole response from the Cloudflare API, containing useful information like occurred errors if any.
All versions of cloudflare-turnstile-php with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
The package fsorge/cloudflare-turnstile-php contains the following files
Loading the files please wait ....