当前位置: 首页>>代码示例>>PHP>>正文


PHP HTTP_Request::HTTP_Request方法代码示例

本文整理汇总了PHP中HTTP_Request::HTTP_Request方法的典型用法代码示例。如果您正苦于以下问题:PHP HTTP_Request::HTTP_Request方法的具体用法?PHP HTTP_Request::HTTP_Request怎么用?PHP HTTP_Request::HTTP_Request使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTTP_Request的用法示例。


在下文中一共展示了HTTP_Request::HTTP_Request方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: HTTP_Request_OAuth

 /**
  * Constructor
  *
  * Sets up the object
  * @param    string  The url to fetch/access
  * @param    array   Associative array of parameters which can have the following keys:
  * <ul>
  *   <li>consumer_key    - Oauth consumer key (string)</li>
  *   <li>consumer_secret - Oauth consumer secret (string)</li>
  *   <li>signature_method - TBD</li>
  *   <li>token           - Oauth session token or frob (string)</li>
  *   <li>token_secret    - Oauth session secret (string)</li>
  *   <li>realm           - Oauth realm (string)</li>
  *   <li>method          - Method to use, GET, POST etc (string)</li>
  *   <li>http            - HTTP Version to use, 1.0 or 1.1 (string)</li>
  *   <li>user            - Basic Auth username (string)</li>
  *   <li>pass            - Basic Auth password (string)</li>
  *   <li>proxy_host      - Proxy server host (string)</li>
  *   <li>proxy_port      - Proxy server port (integer)</li>
  *   <li>proxy_user      - Proxy auth username (string)</li>
  *   <li>proxy_pass      - Proxy auth password (string)</li>
  *   <li>timeout         - Connection timeout in seconds (float)</li>
  *   <li>allowRedirects  - Whether to follow redirects or not (bool)</li>
  *   <li>maxRedirects    - Max number of redirects to follow (integer)</li>
  *   <li>useBrackets     - Whether to append [] to array variable names (bool)</li>
  *   <li>saveBody        - Whether to save response body in response object property (bool)</li>
  *   <li>readTimeout     - Timeout for reading / writing data over the socket (array (seconds, microseconds))</li>
  *   <li>socketOptions   - Options to pass to Net_Socket object (array)</li>
  * </ul>
  * @access public
  */
 function HTTP_Request_OAuth($url = '', $params = array())
 {
     $this->_realm = null;
     $this->_token = null;
     $this->_token_secret = null;
     $this->_consumer_key = null;
     $this->_consumer_secret = null;
     $this->signature_method = $params['signature_method'];
     HTTP_Request::HTTP_Request($url, $params);
     $this->addHeader('User-Agent', 'PHP HTTP_Request_OAuth class');
 }
开发者ID:kjbekkelund,项目名称:php-satisfaction,代码行数:42,代码来源:HTTP_Request_Oauth.php


注:本文中的HTTP_Request::HTTP_Request方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。