Esempio n. 1
0
 private static function exeBySetTimes($count, $curl)
 {
     $result = curl_exec($curl);
     $info = curl_getinfo($curl);
     $code = $info["http_code"];
     if (curl_errno($curl) != 0 && $code != 200) {
         LogUtils::debug("request errno: " . curl_errno($curl) . ",url:" . $info["url"]);
         $count--;
         if ($count > 0) {
             $result = HttpManager::exeBySetTimes($count, $curl);
         }
     }
     return $result;
 }
Esempio n. 2
0
 public function close()
 {
     $params = array();
     $params["action"] = "close";
     $params["appkey"] = $this->appKey;
     HttpManager::httpPostJson($this->host, $params, false);
 }