Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
usarise committed Jun 7, 2023
1 parent 7134c9e commit 5f52e32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,23 @@ declare(strict_types=1);

require_once __DIR__ . '/vendor/autoload.php';

use Ramsey\Uuid\Uuid;
use Symfony\Component\HttpClient\Psr18Client;
use Turnstile\Client\Client;
use Turnstile\Error\Code;
use Turnstile\Turnstile;

// API keys at https://dash.cloudflare.com/?to=/:account/turnstile
$secretKey = '';
// The UUID to be associated with the response.
$idempotencyKey = (string) Uuid::uuid4();

$turnstile = new Turnstile(
client: new Client(
new Psr18Client(),
),
secretKey: $secretKey,
idempotencyKey: $idempotencyKey,
timeoutSeconds: 300,
hostname: $_SERVER['SERVER_NAME'],
action: 'login',
Expand Down

0 comments on commit 5f52e32

Please sign in to comment.