Skip to content

Commit a0b68b8

Browse files
added invisible parameter for hcaptcha
1 parent 01434c0 commit a0b68b8

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

hcaptcha.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ function test_api() {
1515
$params = array();
1616
$params['page_url'] = 'https://your-site.com';
1717
$params['sitekey'] = '1c7062c7-cae6-4e12-96fb-303fbec7fe4f';
18+
//$params['invisible'] = '1'; // if captcha is invisible - optional
1819
//$params['proxy'] = '126.45.34.53:123'; // - optional
1920
//$params['user_agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'; // - optional
2021
$captcha_id = $i->submit_hcaptcha($params);

lib/imagetyperzapi.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ function submit_hcaptcha($d) {
290290
// set it to the data/params
291291
$data["proxy"] = $d['proxy'];
292292
}
293+
// check for invisible
294+
if (isset($d['invisible'])) {
295+
$data["invisible"] = '1';
296+
}
293297
// check for user agent
294298
if (isset($d['user_agent'])) $data["useragent"] = $d['user_agent'];
295299
$response = Utils::post(HCAPTCHA_ENDPOINT, $data, USER_AGENT, $this->_timeout);

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ Requires page_url and sitekey
134134
$params = array();
135135
$params['page_url'] = 'https://your-site.com';
136136
$params['sitekey'] = '1c7062c7-cae6-4e12-96fb-303fbec7fe4f';
137+
//$params['invisible'] = '1'; // if captcha is invisible - optional
137138
//$params['proxy'] = '126.45.34.53:123'; // - optional
138139
//$params['user_agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'; // - optional
139140
$captcha_id = $i->submit_hcaptcha($params);

0 commit comments

Comments
 (0)