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


PHP Curl::_exec方法代码示例

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


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

示例1: _exec

 public function _exec()
 {
     parent::_exec();
     if ($this->error) {
         throw new CurlException($this->curl->error_message, $this->curl->error_code);
     }
 }
开发者ID:rodnover55,项目名称:php-swedbank,代码行数:7,代码来源:Curl.php

示例2: update

 public function update($c_id, $fname = '', $mname = '', $lname = '', $gen = '', $avatar = '', $addl1 = '', $addl2 = '', $city = '', $state = '', $country = '', $zip = '', $dob = '')
 {
     $curl = new Curl();
     $curl->setopt(CURLOPT_URL, "https://v2.api.xapo.com/customers/{$c_id}/?first_name={$fname}middle_name={$mname}&last_name={$lname}&gender={$gen}&avatar={$avatar}&address_line_1={$addl1}&address_line_2={$addl2}&city={$city}&state={$state}&country_iso3={$country}&zip_code={$zip}&date_of_birth={$dob}");
     $curl->setopt(CURLOPT_RETURNTRANSFER, true);
     $curl->setopt(CURLOPT_HEADER, false);
     $curl->setopt(CURLOPT_CUSTOMREQUEST, 'PATCH');
     $curl->_exec();
     $response = $curl->response;
     $curl->close();
     return json_decode($response);
 }
开发者ID:fmedeiros95,项目名称:xapo,代码行数:12,代码来源:Customer.php

示例3: prim_address

 public function prim_address($token, $acc_id)
 {
     $curl = new Curl();
     $curl->setopt(CURLOPT_URL, "https://v2.api.xapo.com/accounts/{$acc_id}/primary_address/");
     $curl->setopt(CURLOPT_RETURNTRANSFER, true);
     $curl->setopt(CURLOPT_HEADER, false);
     $curl->setopt(CURLOPT_HTTPHEADER, ["Authorization: Bearer {$token}"]);
     $curl->_exec();
     $curl->close();
     $response = $curl->response;
     return json_decode($response);
 }
开发者ID:fmedeiros95,项目名称:xapo,代码行数:12,代码来源:Account.php

示例4: disable

 public function disable($token, $id)
 {
     $curl = new Curl();
     $curl->setopt(CURLOPT_URL, "https://v2.api.xapo.com/webhooks/{$id}/disable");
     $curl->setopt(CURLOPT_RETURNTRANSFER, true);
     $curl->setopt(CURLOPT_HEADER, false);
     $curl->setopt(CURLOPT_POST, true);
     $curl->setopt(CURLOPT_HTTPHEADER, ["Authorization: Bearer {$token}"]);
     $curl->_exec();
     $response = $curl->response;
     $curl->close();
     return $response;
 }
开发者ID:fmedeiros95,项目名称:xapo,代码行数:13,代码来源:Webhook.php

示例5: new

 public function new($redirect_uri)
 {
     $curl = new Curl();
     $curl->setopt(CURLOPT_RETURNTRANSFER, true);
     $curl->setopt(CURLOPT_HEADER, false);
     $curl->setopt(CURLOPT_URL, 'https://v2.api.xapo.com/oauth2/token');
     $curl->setopt(CURLOPT_POST, true);
     $curl->setopt(CURLOPT_POSTFIELDS, "grant_type=client_credentials&redirect_uri={$redirect_uri}");
     $curl->setopt(CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded', "Authorization: Basic {$this->hash}"]);
     $curl->_exec();
     $curl->close();
     return json_decode($curl->response)->access_token;
 }
开发者ID:fmedeiros95,项目名称:xapo,代码行数:13,代码来源:Token.php

示例6: update

 public function update($token, $addr, $amount)
 {
     $curl = new Curl();
     $curl->setopt(CURLOPT_URL, "https://v2.api.xapo.com/addresses/{$addr}?payment_threshold={$amount}");
     $curl->setopt(CURLOPT_RETURNTRANSFER, true);
     $curl->setopt(CURLOPT_HEADER, false);
     $curl->setopt(CURLOPT_CUSTOMREQUEST, 'PATCH');
     $curl->setopt(CURLOPT_POSTFIELDS, ['payment_threshold' => $amount]);
     $curl->setopt(CURLOPT_HTTPHEADER, ["Authorization: Bearer {$token}"]);
     $curl->_exec();
     $response = $curl->response;
     $curl->close();
     return json_decode($response);
 }
开发者ID:fmedeiros95,项目名称:xapo,代码行数:14,代码来源:Deposit.php


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