當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Curl::send方法代碼示例

本文整理匯總了PHP中Curl::send方法的典型用法代碼示例。如果您正苦於以下問題:PHP Curl::send方法的具體用法?PHP Curl::send怎麽用?PHP Curl::send使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Curl的用法示例。


在下文中一共展示了Curl::send方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: sendHttpRequest

 /**
  * Send Http request and return response
  *
  * For now we need only get requests
  *
  * @param  $method
  * @param  $path
  * @param  $params
  * @throws SurvariumException
  * @return Response
  */
 private function sendHttpRequest($method, $path, $params)
 {
     $this->request = new Request($method, $path, $params, $this->consumer, $this->signatureProcessor);
     $this->response = new Response();
     $transporter = new Curl($this->request, $this->response);
     $transporter->send();
     return $this->getResponse();
 }
開發者ID:survarium,項目名稱:SurvariumAPI,代碼行數:19,代碼來源:Controller.php

示例2: download

 public function download($url, $saveFile)
 {
     $curl = new Curl();
     $curl->setOption(CURLOPT_URL, $url);
     $response = $curl->send();
     $this->save($response, $saveFile);
     return true;
 }
開發者ID:xiaojiays,項目名稱:curl,代碼行數:8,代碼來源:CurlService.php

示例3: delegateto

	private static function delegateto($to, $sub, $msg) 
	{
        $params  = array(
            'to' => $to,
            'sub' => $sub,
            'msg' => $msg,
			'from' => self::$from,
			'smtpuser' => self::$user,
			'smtppass' => self::$pass
        );
		//print_r($params);
		$curl = new Curl(self::$value, $params);
		return $curl->send();
	}
開發者ID:nimitz92,項目名稱:snowblozm-lite,代碼行數:14,代碼來源:Mail.class.php

示例4: logout

 public function logout()
 {
     include 'Curl.php';
     $siteCfg = (include 'siteConfig.php');
     $syncLogout = true;
     foreach ($siteCfg['site'] as $siteId => $site) {
         if (empty($site['logoutSer'])) {
             continue;
         }
         if (isset($_COOKIE[$siteId])) {
             $syncLogout = \Curl::send($site['logoutSer'], array('logoutRequest' => true, 'sessid' => $_COOKIE[$siteId]), 'post') == 1 ? true : false;
             $this->cookie->del($siteId);
         }
     }
     return $syncLogout && $this->cookie->del('cas');
 }
開發者ID:nicklos17,項目名稱:ucenter,代碼行數:16,代碼來源:CAServer.php

示例5: log

 /**
  * 記錄日誌
  * @param  string $content [description]
  * @return [type]          [description]
  */
 public function log($controller, $action, $content = '')
 {
     $data = array('adminId' => $this->casInfo['uid'], 'siteId' => $this->cfg['siteid'], 'controller' => $controller, 'action' => $action, 'content' => $content);
     return Curl::send($this->cfg['logUrl'], $data, 'post');
 }
開發者ID:nicklos17,項目名稱:littlemall,代碼行數:10,代碼來源:CasClient.php

示例6: send

 /**
  * Send the HTTP request.
  * @return Response
  * @throws \LogicException
  * @throws RequestException
  */
 public function send()
 {
     $this->response = $this->curl->send($this, $this->autoFollow, $this->maxRedirects);
     return $this->response;
 }
開發者ID:novotnyj,項目名稱:http-helper,代碼行數:11,代碼來源:Request.php


注:本文中的Curl::send方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。