Example #1
0
 /**
  * @param string $query
  * @param int $start
  * @return bool
  */
 private function checkQuery($query, $start)
 {
     $result = false;
     while ($start < $this->pagesCount * $this->linksCount) {
         $proxyResult = Proxy::proxyResults($query, $start, $this->flag);
         if ($proxyResult === false && Proxy::$proxyIndex < $this->maxProxyAmount) {
             Proxy::$proxyIndex++;
             continue;
         }
         $result = !empty($proxyResult) && !empty($proxyResult['links']) && count($proxyResult['links']) >= $this->minLinksAmount;
         if (!$result) {
             var_dump($proxyResult);
             break;
         }
         $start += $this->linksCount;
     }
     return $result;
 }