diff --git a/README.md b/README.md index 6105836..b51e503 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,9 @@ Examples of API requests for different captcha types are available on the [PHP c - [atbCAPTCHA](#atbcaptcha) - [DataDome](#datadome) - [CyberSiARA](#cybersiara) + - [Prosopo](#prosopo) + - [Temu](#temu) + - [Captchafox](#captchafox) - [Other methods](#other-methods) - [send / getResult](#send--getresult) - [balance](#balance) @@ -444,6 +447,53 @@ $result = $solver->cybersiara([ ]); ``` +### Prosopo + +[API method description.](https://2captcha.com/2captcha-api#prosopo-procaptcha) + +Use this method to bypass Prosopo. + +```php + $result = $solver->prosopo([ + 'sitekey' => '5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm', + 'url' => 'https://www.twickets.live/', + ]); +``` + + +### Temu + +[API method description.](https://2captcha.com/2captcha-api#temucaptcha) + +Use this method to bypass Temu. + +```php + $result = $solver->temu([ + 'body' => $body, + 'part1' => $part1, + 'part2' => $part2, + 'part3' => $part3, + ]); +``` + +### Captchafox + +[API method description.](https://2captcha.com/2captcha-api#captchafox) + +Use this method to bypass Captchafox. + +```php + $result = $solver->captchafox([ + 'sitekey' => 'sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH', + 'url' => 'https://mysite.com/page/with/captchafox', + 'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', + 'proxy' => [ + 'type' => 'HTTPS', + 'uri' => 'login:password@IP_address:PORT', + ], + ]); +``` + ## Other methods diff --git a/composer.json b/composer.json index 6a43a4e..648eb2c 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,10 @@ "Cutcaptcha", "Friendly Captcha", "atbCAPTCHA", - "DataDome" + "DataDome", + "Prosopo", + "Temu", + "Captchafox" ], "license": "MIT", "authors": [ diff --git a/examples/captchafox.php b/examples/captchafox.php new file mode 100644 index 0000000..87993ba --- /dev/null +++ b/examples/captchafox.php @@ -0,0 +1,25 @@ +captchafox([ + 'sitekey' => 'sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH', + 'url' => 'https://mysite.com/page/with/captchafox', + 'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', + 'proxy' => [ + 'type' => 'HTTPS', + 'uri' => 'login:password@IP_address:PORT', + ], + ]); +} catch (\Exception $e) { + die($e->getMessage()); +} + +die('Captcha solved: ' . $result->code); diff --git a/examples/prosopo.php b/examples/prosopo.php new file mode 100644 index 0000000..53a3a60 --- /dev/null +++ b/examples/prosopo.php @@ -0,0 +1,23 @@ +prosopo([ + 'sitekey' => '5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm', + 'url' => 'https://www.twickets.live/', + ]); + +} catch (\Exception $e) { + die($e->getMessage()); +} + +die('Captcha solved: ' . $result->code); + diff --git a/examples/resources/temu/body.png b/examples/resources/temu/body.png new file mode 100644 index 0000000..e45ed92 Binary files /dev/null and b/examples/resources/temu/body.png differ diff --git a/examples/resources/temu/part1.png b/examples/resources/temu/part1.png new file mode 100644 index 0000000..792f6de Binary files /dev/null and b/examples/resources/temu/part1.png differ diff --git a/examples/resources/temu/part2.png b/examples/resources/temu/part2.png new file mode 100644 index 0000000..de5a603 Binary files /dev/null and b/examples/resources/temu/part2.png differ diff --git a/examples/resources/temu/part3.png b/examples/resources/temu/part3.png new file mode 100644 index 0000000..be84dba Binary files /dev/null and b/examples/resources/temu/part3.png differ diff --git a/examples/temu.php b/examples/temu.php new file mode 100644 index 0000000..f1bb121 --- /dev/null +++ b/examples/temu.php @@ -0,0 +1,31 @@ +temu([ + 'body' => $body, + 'part1' => $part1, + 'part2' => $part2, + 'part3' => $part3, + ]); + +} catch (\Exception $e) { + die($e->getMessage()); +} + +die('Captcha solved: ' . $result->code); + diff --git a/src/TwoCaptcha.php b/src/TwoCaptcha.php index 901796f..1886745 100644 --- a/src/TwoCaptcha.php +++ b/src/TwoCaptcha.php @@ -601,6 +601,57 @@ public function cybersiara($captcha) return $this->solve($captcha); } + /** + * Wrapper for solving Prosopo + * + * @param $captcha + * @return \stdClass + * @throws ApiException + * @throws NetworkException + * @throws TimeoutException + * @throws ValidationException + */ + public function prosopo($captcha) + { + $captcha['method'] = 'prosopo'; + + return $this->solve($captcha); + } + + /** + * Wrapper for solving Temu + * + * @param $captcha + * @return \stdClass + * @throws ApiException + * @throws NetworkException + * @throws TimeoutException + * @throws ValidationException + */ + public function temu($captcha) + { + $captcha['method'] = 'temuimage'; + + return $this->solve($captcha); + } + + /** + * Wrapper for solving Temu + * + * @param $captcha + * @return \stdClass + * @throws ApiException + * @throws NetworkException + * @throws TimeoutException + * @throws ValidationException + */ + public function captchafox($captcha) + { + $captcha['method'] = 'captchafox'; + + return $this->solve($captcha); + } + /** * Sends captcha to `/in.php` and waits for it's result. * This helper can be used insted of manual using of `send` and `getResult` functions. diff --git a/tests/CaptchafoxTest.php b/tests/CaptchafoxTest.php new file mode 100644 index 0000000..3b012f0 --- /dev/null +++ b/tests/CaptchafoxTest.php @@ -0,0 +1,37 @@ + 'sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH', + 'pageurl' => 'https://mysite.com/page/with/captchafox', + 'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', + 'proxy' => [ + 'type' => 'HTTPS', + 'uri' => 'username:str0ngP@$$W0rd@1.2.3.4:4321', + ] + ]; + + $sendParams = [ + 'method' => 'captchafox', + 'sitekey' => 'sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH', + 'pageurl' => 'https://mysite.com/page/with/captchafox', + 'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', + 'proxy' => 'username:str0ngP@$$W0rd@1.2.3.4:4321', + 'proxytype' => 'HTTPS', + 'soft_id' => '4585', + ]; + + $this->checkIfCorrectParamsSendAndResultReturned([ + 'params' => $params, + 'sendParams' => $sendParams, + 'sendFiles' => [], + ]); + } +} diff --git a/tests/ProsopoTest.php b/tests/ProsopoTest.php new file mode 100644 index 0000000..5d35304 --- /dev/null +++ b/tests/ProsopoTest.php @@ -0,0 +1,35 @@ + '5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm', + 'pageurl' => 'https://www.twickets.live/', + 'proxy' => [ + 'type' => 'HTTPS', + 'uri' => 'username:str0ngP@$$W0rd@1.2.3.4:4321', + ] + ]; + + $sendParams = [ + 'method' => 'prosopo', + 'sitekey' => '5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm', + 'pageurl' => 'https://www.twickets.live/', + 'proxy' => 'username:str0ngP@$$W0rd@1.2.3.4:4321', + 'proxytype' => 'HTTPS', + 'soft_id' => '4585', + ]; + + $this->checkIfCorrectParamsSendAndResultReturned([ + 'params' => $params, + 'sendParams' => $sendParams, + 'sendFiles' => [], + ]); + } +} diff --git a/tests/TemuTest.php b/tests/TemuTest.php new file mode 100644 index 0000000..2f03116 --- /dev/null +++ b/tests/TemuTest.php @@ -0,0 +1,41 @@ + $body, + 'part1' => $part1, + 'part2' => $part2, + 'part3' => $part3 + ]; + + $sendParams = [ + 'method' => 'temuimage', + 'body' => $body, + 'part1' => $part1, + 'part2' => $part2, + 'part3' => $part3, + 'soft_id' => '4585', + ]; + + + $this->checkIfCorrectParamsSendAndResultReturned([ + 'params' => $params, + 'sendParams' => $sendParams, + 'sendFiles' => [], + ]); + } + +}