Example #1
0
 /**
  * data downloaded by CUrl
  * @return string
  */
 protected function &curl()
 {
     $curl = new CUrl();
     //$curl->setProxy();
     $cnb = NULL;
     foreach ($this->links as $key => $link) {
         $curl->setOption(\CURLOPT_URL, $this->fillDate($link));
         if ($curl->getErrorNumber() > 0) {
             if ($key == 0) {
                 throw new ExchangeException('Let\'s check internet connection.');
             }
             continue;
         } else {
             $cnb .= $curl->getResult();
         }
     }
     return $cnb;
 }