示例#1
0
 public function run()
 {
     $i = 0;
     while ($i < 100) {
         $i++;
         $proxy = $this->proxy->getWorks();
         $this->connector->setProxy($proxy);
         $list = $this->parserFreeProxy->getIpList();
         //$response = $this->connector->getResponse('https://api.ipify.org');
         /*if($response == $proxy->ip){
         			echo 'works';
         		} else {
         			echo 'not wokrs';
         		}*/
         exit;
     }
 }
示例#2
0
 public function getBody()
 {
     $proxy = $this->proxy->getWorks();
     $this->connector->setProxy($proxy);
     return $this->connector->getResponse($this->url);
 }