File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ Examples of API requests for different captcha types are available on the [PHP c
5050 - [ VK Image] ( #vk-image )
5151 - [ Altchacaptcha] ( #altchacaptcha )
5252 - [ Binancecaptcha] ( #binancecaptcha )
53+ - [ Yidun] ( #yidun )
5354 - [ Other methods] ( #other-methods )
5455 - [ send / getResult] ( #send--getresult )
5556 - [ balance] ( #balance )
@@ -550,7 +551,7 @@ Use this method to bypass Altchacaptcha.
550551
551552<sup >[ API method description.] ( https://2captcha.com/2captcha-api#binance ) </sup >
552553
553- Use this method to bypass binance .
554+ Use this method to bypass Binance .
554555
555556``` php
556557 $result = $solver->binance([
@@ -560,6 +561,20 @@ Use this method to bypass binance.
560561 ]);
561562```
562563
564+ ### Yidun
565+
566+ <sup >[ API method description.] ( https://2captcha.com/2captcha-api#yidun ) </sup >
567+
568+ Use this method to bypass Yidun.
569+
570+ ``` php
571+ $result = $solver->yidun([
572+ 'sitekey' => '0f743r3g1...8rz3grz0ym5',
573+ 'url' => 'https://example.com/page-with-yidun'
574+ ]);
575+ ```
576+
577+
563578## Other methods
564579
565580### send / getResult
Original file line number Diff line number Diff line change 1+ <?php
2+ use TwoCaptcha \TwoCaptcha ;
3+
4+ require (__DIR__ . '/../src/autoloader.php ' );
5+
6+ //$argv[1] = YOUR_API_KEY
7+ $ solver = new TwoCaptcha ($ argv [1 ]);
8+
9+ try {
10+ $ result = $ solver ->yidun ([
11+ 'sitekey ' => '0f743r3g1...8rz3grz0ym5 ' ,
12+ 'url ' => 'https://example.com/page-with-yidun '
13+ ]);
14+ } catch (\Exception $ e ) {
15+ die ($ e ->getMessage ());
16+ }
17+
18+ die ('Captcha solved: ' . $ result ->code );
Original file line number Diff line number Diff line change 1+ <?php
2+ use TwoCaptcha \TwoCaptcha ;
3+
4+ require (__DIR__ . '/../src/autoloader.php ' );
5+
6+ //$argv[1] = YOUR_API_KEY
7+ $ solver = new TwoCaptcha ($ argv [1 ]);
8+
9+ try {
10+ $ result = $ solver ->yidun ([
11+ 'sitekey ' => '0f743r3g1...8rz3grz0ym5 ' ,
12+ 'url ' => 'https://example.com/page-with-yidun ' ,
13+ 'proxy ' => [
14+ 'type ' => 'HTTPS ' ,
15+ 'uri ' => 'login:password@IP_address:PORT ' ,
16+ ],
17+ ]);
18+ } catch (\Exception $ e ) {
19+ die ($ e ->getMessage ());
20+ }
21+
22+ die ('Captcha solved: ' . $ result ->code );
Original file line number Diff line number Diff line change @@ -698,6 +698,13 @@ public function binance($captcha)
698698 return $ this ->solve ($ captcha );
699699 }
700700
701+ public function yidun ($ captcha )
702+ {
703+ $ captcha ['method ' ] = 'yidun ' ;
704+
705+ return $ this ->solve ($ captcha );
706+ }
707+
701708 /**
702709 * Sends captcha to `/in.php` and waits for it's result.
703710 * This helper can be used insted of manual using of `send` and `getResult` functions.
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace TwoCaptcha \Tests ;
4+
5+ class YidunTest extends AbstractWrapperTestCase
6+ {
7+ protected $ method = 'yidun ' ;
8+
9+ public function testAllOptions ()
10+ {
11+ $ params = [
12+ 'sitekey ' => '0f743r3g1...8rz3grz0ym5 ' ,
13+ 'url ' => 'https://example.com/page-with-yidun ' ,
14+ 'proxy ' => [
15+ 'type ' => 'HTTPS ' ,
16+ 'uri ' => 'login:password@IP_address:PORT ' ,
17+ ]
18+ ];
19+
20+ $ sendParams = [
21+ 'method ' => 'yidun ' ,
22+ 'sitekey ' => '0f743r3g1...8rz3grz0ym5 ' ,
23+ 'pageurl ' => 'https://example.com/page-with-yidun ' ,
24+ 'proxy ' => 'login:password@IP_address:PORT ' ,
25+ 'proxytype ' => 'HTTPS ' ,
26+ 'soft_id ' => '4585 ' ,
27+ 'json ' => '0 '
28+ ];
29+
30+ $ this ->checkIfCorrectParamsSendAndResultReturned ([
31+ 'params ' => $ params ,
32+ 'sendParams ' => $ sendParams ,
33+ 'sendFiles ' => [],
34+ ]);
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments