本文整理匯總了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);
}