当前位置: 首页>>代码示例>>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;未经允许,请勿转载。