|
16 | 16 | define('TIKTOK_ENDPOINT', 'http://captchatypers.com/captchaapi/UploadTikTokCaptchaUser.ashx');
|
17 | 17 | define('FUNCAPTCHA_ENDPOINT', 'http://captchatypers.com/captchaapi/UploadFunCaptcha.ashx');
|
18 | 18 | define('TASK_ENDPOINT', 'http://captchatypers.com/captchaapi/UploadCaptchaTask.ashx');
|
| 19 | +define('TASK_PUSH_ENDPOINT', 'http://captchatypers.com/CaptchaAPI/SaveCaptchaPush.ashx'); |
19 | 20 |
|
20 | 21 | define('CAPTCHA_ENDPOINT_CONTENT_TOKEN', 'http://captchatypers.com/Forms/UploadFileAndGetTextNEWToken.ashx');
|
21 | 22 | define('CAPTCHA_ENDPOINT_URL_TOKEN', 'http://captchatypers.com/Forms/FileUploadAndGetTextCaptchaURLToken.ashx');
|
@@ -521,6 +522,33 @@ function account_balance() {
|
521 | 522 |
|
522 | 523 | return '$' . $response; // return response
|
523 | 524 | }
|
| 525 | + |
| 526 | + // Push variables for task |
| 527 | + function task_push_variables($captcha_id, $variables) { |
| 528 | + // set data array |
| 529 | + $data = array( |
| 530 | + "action" => "GETTEXT", |
| 531 | + "captchaid" => $captcha_id, |
| 532 | + "pushVariables" => json_encode($variables) |
| 533 | + ); |
| 534 | + |
| 535 | + if (!empty($this->_username)) { |
| 536 | + $data["username"] = $this->_username; |
| 537 | + $data["password"] = $this->_password; |
| 538 | + } else { |
| 539 | + $data['token'] = $this->_access_token; |
| 540 | + } |
| 541 | + $url = TASK_PUSH_ENDPOINT; |
| 542 | + |
| 543 | + // do request |
| 544 | + $response = Utils::post($url, $data, USER_AGENT, $this->_timeout); |
| 545 | + // parse response |
| 546 | + if (strpos($response, 'ERROR:') !== false) { |
| 547 | + throw new Exception(trim(explode('ERROR:', $response)[1])); |
| 548 | + } |
| 549 | + |
| 550 | + return $response; // return response |
| 551 | + } |
524 | 552 |
|
525 | 553 | // Set captcha bad
|
526 | 554 | function set_captcha_bad($captcha_id) {
|
|
0 commit comments