本文整理汇总了PHP中Curl::doCurlRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP Curl::doCurlRequest方法的具体用法?PHP Curl::doCurlRequest怎么用?PHP Curl::doCurlRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Curl
的用法示例。
在下文中一共展示了Curl::doCurlRequest方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: verifyCode
/**
* Get code sent by from Transferuj SMS widget.
* Validate code by sending cURL to Transferuj server.
*
* @return bool
*
* @throws TException
*/
public function verifyCode()
{
$codeToCheck = Util::post('tfCodeToCheck', 'string');
$hash = Util::post('tfHash', 'string');
if ($codeToCheck === false || $hash === false) {
throw new TException('Invalid input data');
}
$postData = array('tfCodeToCheck' => $codeToCheck, 'tfHash' => $hash);
$response = Curl::doCurlRequest($this->secureURL, $postData);
$data = explode("\n", $response);
$status = (int) $data[0];
$lifetime = rtrim($data[1]);
if ($status === 1) {
return true;
} else {
return false;
}
}
示例2: postRequest
/**
* Execute post request to card API
*
* @param string $url url
* @param array $params
*
* @return bool|mixed
*/
private function postRequest($url, $params = array())
{
$curlRes = Curl::doCurlRequest($url, $params);
return json_decode($curlRes, true);
}
示例3: request
/**
* Send API request
*
* @param string $method method name
* @param array $postData post data
*
* @return mixed
*/
protected function request($method, $postData)
{
$url = $this->apiUrl . $this->partnerUniqueAddress . '/' . $method;
return Curl::doCurlRequest($url, $postData);
}
示例4: requests
/**
* Execute request to Transferuj transaction API
*
* @param string $url url
* @param array $params post params
*
* @return bool|mixed
*/
private function requests($url, $params)
{
$params['api_password'] = $this->apiPass;
return Curl::doCurlRequest($url, $params);
}