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

19 lines
387 B
PHP

<?php
set_time_limit(130);
require(__DIR__ . '/../src/autoloader.php');
$solver = new \TwoCaptcha\TwoCaptcha('YOUR_API_KEY');
try {
$result = $solver->hcaptcha([
'sitekey' => '10000000-ffff-ffff-ffff-000000000001',
'url' => 'https://www.site.com/page/',
]);
} catch (\Exception $e) {
die($e->getMessage());
}
die('Captcha solved: ' . $result->code);