Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pageAction for Recaptcha V3 #23

Open
zerowebcorp opened this issue Sep 22, 2024 · 1 comment
Open

pageAction for Recaptcha V3 #23

zerowebcorp opened this issue Sep 22, 2024 · 1 comment

Comments

@zerowebcorp
Copy link

I do not see an option to pass the value for pageAction parameter for recaptcha v3

@dzmitry-duboyski
Copy link
Contributor

dzmitry-duboyski commented Dec 4, 2024

This example describes how to send an action parameter for recaptcha v3:

// https://github.com/2captcha/2captcha-php/blob/fa04f580fb32867204be0d5cae8891cc29f4e92e/examples/recaptcha_v3_options.php#L17

<?php

set_time_limit(610);

require(__DIR__ . '/../src/autoloader.php');

$solver = new \TwoCaptcha\TwoCaptcha([
    'apiKey'	=> 'YOUR_API_KEY',
    'server'	=> 'http://2captcha.com'
]);

try {
    $result = $solver->recaptcha([
        'sitekey' => '6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
        'url'     => 'https://mysite.com/page/with/recaptcha',
        'version' => 'v3',
        'action'  => 'verify',  // Value of action parameter you found on page
        'score'   => 0.3,
        'proxy'   => [
            'type' => 'HTTPS',
            'uri'  => 'login:password@IP_address:PORT',
        ],
    ]);
} catch (\Exception $e) {
    die($e->getMessage());
}

die('Captcha solved: ' . $result->code);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants