|
1
|
|
|
<?php |
|
2
|
|
|
namespace LaravelAnticaptcha\Anticaptcha; |
|
3
|
|
|
|
|
4
|
|
|
class GeeTest extends Anticaptcha implements AntiCaptchaTaskProtocol { |
|
5
|
|
|
|
|
6
|
|
|
private $websiteUrl; |
|
7
|
|
|
private $websiteKey; |
|
8
|
|
|
private $websiteChallenge; |
|
9
|
|
|
private $geetestApiServerSubdomain; |
|
10
|
|
|
private $proxyType = "http"; |
|
11
|
|
|
private $proxyAddress; |
|
12
|
|
|
private $proxyPort; |
|
13
|
|
|
private $proxyLogin; |
|
14
|
|
|
private $proxyPassword; |
|
15
|
|
|
private $userAgent = ""; |
|
16
|
|
|
private $cookies = ""; |
|
17
|
|
|
|
|
18
|
|
|
public function getPostData() { |
|
19
|
|
|
return array( |
|
20
|
|
|
"type" => "GeeTestTask", |
|
21
|
|
|
"websiteURL" => $this->websiteUrl, |
|
22
|
|
|
"geetestApiServerSubdomain" => $this->geetestApiServerSubdomain, |
|
23
|
|
|
"gt" => $this->websiteKey, |
|
24
|
|
|
"challenge" => $this->websiteChallenge, |
|
25
|
|
|
"proxyType" => $this->proxyType, |
|
26
|
|
|
"proxyAddress" => $this->proxyAddress, |
|
27
|
|
|
"proxyPort" => $this->proxyPort, |
|
28
|
|
|
"proxyLogin" => $this->proxyLogin, |
|
29
|
|
|
"proxyPassword" => $this->proxyPassword, |
|
30
|
|
|
"userAgent" => $this->userAgent, |
|
31
|
|
|
"cookies" => $this->cookies |
|
32
|
|
|
); |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
public function setTaskInfo($taskInfo) { |
|
36
|
|
|
$this->taskInfo = $taskInfo; |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
public function getTaskSolution() { |
|
40
|
|
|
return $this->taskInfo->solution; |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
public function setWebsiteURL($value) { |
|
44
|
|
|
$this->websiteUrl = $value; |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
public function setGTKey($value) { |
|
48
|
|
|
$this->websiteKey = $value; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function setChallenge($value) { |
|
52
|
|
|
$this->websiteChallenge = $value; |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
public function setProxyType($value) { |
|
56
|
|
|
$this->proxyType = $value; |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
public function setProxyAddress($value) { |
|
60
|
|
|
$this->proxyAddress = $value; |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
public function setProxyPort($value) { |
|
64
|
|
|
$this->proxyPort = $value; |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
public function setProxyLogin($value) { |
|
68
|
|
|
$this->proxyLogin = $value; |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
public function setProxyPassword($value) { |
|
72
|
|
|
$this->proxyPassword = $value; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
public function setUserAgent($value) { |
|
76
|
|
|
$this->userAgent = $value; |
|
77
|
|
|
} |
|
78
|
|
|
|
|
79
|
|
|
public function setCookies($value) { |
|
80
|
|
|
$this->cookies = $value; |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
public function setAPISubdomain($value) { |
|
84
|
|
|
$this->geetestApiServerSubdomain = $value; |
|
85
|
|
|
} |
|
86
|
|
|
|
|
87
|
|
|
} |
|
88
|
|
|
|