MCBBSAutoSignIn/2captcha-php/examples/recaptcha_v3.php
jie Ago 39db30c13e .
2022-11-05 23:51:39 +08:00

20 lines
431 B
PHP

<?php
set_time_limit(610);
require(__DIR__ . '/../src/autoloader.php');
$solver = new \TwoCaptcha\TwoCaptcha('YOUR_API_KEY');
try {
$result = $solver->recaptcha([
'sitekey' => '6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
'url' => 'https://mysite.com/page/with/recaptcha',
'version' => 'v3',
]);
} catch (\Exception $e) {
die($e->getMessage());
}
die('Captcha solved: ' . $result->code);