本文整理汇总了PHP中Curl::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Curl::__construct方法的具体用法?PHP Curl::__construct怎么用?PHP Curl::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Curl
的用法示例。
在下文中一共展示了Curl::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->mysql = new db_connect();
$this->pzn = $this->mysql->get_pzn();
$this->negative_kws = $this->mysql->get_negative_kws();
}
示例2: __construct
public function __construct($sUrl, $sApp, $sExtra)
{
parent::__construct($sUrl);
$aCurlVersion = curl_version();
$sCurlVersion = $aCurlVersion['version'];
$sPHPVersion = PHP_VERSION;
$this->setUserAgent("{$sApp} ({$sExtra}; PHP {$sPHPVersion}; cURL {$sCurlVersion})");
$this->setReturnTransfer(true);
$this->setFollowLocation(true);
}
示例3: __construct
public function __construct($sUrl, $sApp, $sExtra)
{
parent::__construct($sUrl);
$aCURLVersion = curl_version();
$this->setUserAgent($sApp . ' (' . $sExtra . '; PHP ' . PHP_VERSION . '; cURL ' . $aCURLVersion['version'] . ')');
// setting CURLOPT_FOLLOWLOCATION in safe_mode will raise a warning
if (ini_get('safe_mode') == 'Off' || ini_get('safe_mode') === 0) {
$this->setOption(CURLOPT_FOLLOWLOCATION, true);
$this->setOption(CURLOPT_MAXREDIRS, 3);
}
}
示例4: __construct
/**
* Initialize the wraper with an internal cURL handle
*
* @param str $url
* @return void
*/
public function __construct($url = NULL)
{
$this->handle = curl_init();
parent::__construct($url);
}
示例5: __construct
/**
* Constructor
*
* @param array $options
*/
public function __construct($url, $options = null)
{
parent::__construct($url, $options);
$this->prepare();
}
示例6: __construct
public function __construct()
{
parent::__construct();
}
示例7: __construct
public function __construct(array $curlOptions = array())
{
parent::__construct($curlOptions);
}
示例8: __construct
public function __construct($logger)
{
$this->log = $logger;
parent::__construct($logger);
$this->log->debug('-------------------------------------- NEW REQUEST --------------------------------------');
}
示例9: __construct
/**
* Class constructor
*
* @return void
*/
public function __construct($base_url = null)
{
parent::__construct($base_url);
}