PHP code example of geekk / multi-captcha-laravel
1. Go to this page and download the library: Download geekk/multi-captcha-laravel library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
geekk / multi-captcha-laravel example snippets
'recaptcha2' => [
'driver' => 'recaptcha2',
'site_key' => 'your site key for reCaptcha v2',
'secret_key' => 'your secret key for reCaptcha v2'
],
'hcaptcha' => [
'driver' => 'hcaptcha',
'site_key' => 'your site key for hCaptcha',
'secret_key' => 'your secret key for hCaptcha'
],
'kcaptcha' => [
'driver' => 'kcaptcha',
'show_credits' => false
],
'gregwar' => [
'driver' => 'gregwar',
// optional: width, height, length, quality, allowed_symbols
],
'turnstile' => [
'driver' => 'turnstile',
'site_key' => 'your site key for Cloudflare Turnstile',
'secret_key' => 'your secret key for Cloudflare Turnstile'
],
use Geekk\MultiCaptcha\Laravel\CaptchaManager;
$captchaManager = app(CaptchaManager::class)
$captcha = $captchaManager->getCaptcha();
// Render captcha in template
echo $captcha->render();
// Verify user's response
$result = $captcha->verify($captchaManager->getRequest($request));
php artisan vendor:publish --provider="Geekk\MultiCaptcha\Laravel\CaptchaServiceProvider" --tag="config"