Exemple #1
0
 /**
  * @param null $url
  * @param null $post
  */
 public function sendRequest($url = null, $post = null)
 {
     // 设置请求信息
     curl_setopt($this->getHandler(), CURLOPT_CONNECTTIMEOUT, 5);
     curl_setopt($this->getHandler(), CURLOPT_TIMEOUT, 3);
     $crypt_key = '2S23ED';
     $post['sign'] = md5(json_encode($post) . $crypt_key);
     parent::sendRequest($url, $post);
 }
Exemple #2
0
 /**
  * @param null $url
  * @param null $post
  */
 public function sendRequest($url = null, $post = null)
 {
     curl_setopt($this->getHandler(), CURLINFO_HEADER_OUT, true);
     parent::sendRequest($url, $post);
     $this->outputFile();
 }