forked from anti-captcha/anticaptcha-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
funcaptchaproxyless.php
54 lines (43 loc) · 1.38 KB
/
funcaptchaproxyless.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
class FunCaptchaProxyless extends Anticaptcha implements AntiCaptchaTaskProtocol {
private $websiteUrl;
private $jsSubdomain;
private $websitePublicKey;
private $dataBlob;
public function getPostData() {
$data = array(
"type" => "FunCaptchaTaskProxyless",
"websiteURL" => $this->websiteUrl,
"funcaptchaApiJSSubdomain" => $this->jsSubdomain,
"websitePublicKey" => $this->websitePublicKey
);
if ($this->jsSubdomain != null) {
$data["funcaptchaApiJSSubdomain"] = $this->jsSubdomain;
}
if ($this->dataBlob != null) {
$data["data"] = $this->dataBlob;
}
return $data;
}
public function setTaskInfo($taskInfo) {
$this->taskInfo = $taskInfo;
}
public function getTaskSolution() {
return $this->taskInfo->solution->token;
}
public function setWebsiteURL($value) {
$this->websiteUrl = $value;
}
public function setJSSubdomain($value) {
$this->jsSubdomain = $value;
}
public function setWebsitePublicKey($value) {
$this->websitePublicKey = $value;
}
/**
* @param string $dataBlob
*/
public function setDataBlob($dataBlob) {
$this->dataBlob = $dataBlob;
}
}