| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  | namespace LaravelAnticaptcha\Anticaptcha; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  | class FunCaptcha extends Anticaptcha implements AntiCaptchaTaskProtocol { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |     private $websiteUrl; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |     private $jsSubdomain; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |     private $websitePublicKey; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |     private $proxyType = "http"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |     private $proxyAddress; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  |     private $proxyPort; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |     private $proxyLogin; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |     private $proxyPassword; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |     private $userAgent = ""; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |     private $cookies = ""; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |      | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |     public function getPostData() { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |         return array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |             "type"                      =>  "FunCaptchaTask", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |             "websiteURL"                =>  $this->websiteUrl, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |             "funcaptchaApiJSSubdomain"  =>  $this->jsSubdomain, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |             "websitePublicKey"          =>  $this->websitePublicKey, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |             "proxyType"                 =>  $this->proxyType, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |             "proxyAddress"              =>  $this->proxyAddress, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |             "proxyPort"                 =>  $this->proxyPort, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |             "proxyLogin"                =>  $this->proxyLogin, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |             "proxyPassword"             =>  $this->proxyPassword, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |             "userAgent"                 =>  $this->userAgent, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |             "cookies"                   =>  $this->cookies | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 32 |  |  |      | 
            
                                                                        
                            
            
                                    
            
            
                | 33 |  |  |     public function getTaskSolution() { | 
            
                                                                        
                            
            
                                    
            
            
                | 34 |  |  |         return $this->taskInfo->solution->token; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |      | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |     public function setWebsiteURL($value) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |         $this->websiteUrl = $value; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |      | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |     public function setWebsitePublicKey($value) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |         $this->websitePublicKey = $value; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |      | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |     public function setProxyType($value) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |         $this->proxyType = $value; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |      | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |     public function setProxyAddress($value) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |         $this->proxyAddress = $value; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |      | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |     public function setProxyPort($value) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |         $this->proxyPort = $value; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |      | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  |     public function setProxyLogin($value) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  |         $this->proxyLogin = $value; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |      | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  |     public function setProxyPassword($value) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  |         $this->proxyPassword = $value; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 63 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  |      | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |     public function setUserAgent($value) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 |  |  |         $this->userAgent = $value; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 67 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 68 |  |  |      | 
            
                                                                                                            
                            
            
                                    
            
            
                | 69 |  |  |     public function setCookies($value) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 70 |  |  |         $this->cookies = $value; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 71 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 72 |  |  |      | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 73 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 74 |  |  |  |