curl处理https 融云接口php
来源:互联网 发布:学淘宝运营要多长时间 编辑:程序博客网 时间:2024/05/21 00:52
</pre>开始未找到融云即时通讯的接口<p></p><p><span style="color: rgb(51, 51, 51); font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13.3333330154419px; line-height: 24px; background-color: rgb(214, 211, 214);">自己写了个curl</span></p><p><span style="color: rgb(51, 51, 51); font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13.3333330154419px; line-height: 24px; background-color: rgb(214, 211, 214);"></span><pre name="code" class="php">$url = "https://api.cn.rong.io/user/getToken.json";$post_data = array ("userId" => "bob","name" => "12345",'App-Key'=>'mgb7ka1ns','Timestamp'=>time(),'appSecret'=>'mgb7ka1nb','portraitUri'=>'http://admin.alaa.com/Public/system/images/headavator/img_avatar.png'); $ch = curl_init();//初始化curl_setopt($ch, CURLOPT_URL, $url);// curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);//取消sll验证curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);// post数据curl_setopt($ch, CURLOPT_POST, 1);//是否打印curl_setopt($ch, CURLOPT_HEADER, 0);$data = http_build_query($post_data);// post的变量curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); $output = curl_exec($ch);if($output === false){ echo curl_error($ch);exit;}curl_close($ch); //打印获得的数据var_dump($output);
SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed”。
但是还是不好使。现在也没有想明白。
最后还是奉上融云php的接口吧,希望哪位能指点下是curl哪里错了。
0 0
- curl处理https 融云接口php
- PHP CURL HTTPS POST
- PHP CURL HTTPS POST
- PHP CURL HTTPS POST
- php curl http https
- PHP curl请求https
- php curl 打开https网站
- curl PHP linux 下取值 https
- php curl 模拟登陆https
- PHP 的curl 请求https
- php curl https代码示例
- php curl模拟https请求
- PHP CURL接口问题
- php curl 接口请求
- php curl请求https接口返回curl: (60) SSL certificate problem: unable to get local issuer certificate 错误
- PHP:CURL分别以GET、POST方式请求HTTPS协议接口api
- PHP:CURL分别以GET、POST方式请求HTTPS协议接口api
- php curl 超时处理
- Quartz 2D绘图简介
- 题目1512:用两个栈实现队列
- net.sf.json.JSONException: There is a cycle in the hierarchy! 解决方法
- Android Animation动画(很详细)
- 对 “句柄” “指针” 有下面的描述(AfxGetMainWnd GetSafeHwnd() AfxGetAppName() AfxGetThread)
- curl处理https 融云接口php
- Android DiskLruCache磁盘缓存
- Java--Timer类研究
- VL02N修改外交货的表头数据的BAPI
- python 火车票监控12306
- LeetCode[Tree]: Populating Next Right Pointers in Each Node II
- IOS之Quartz
- Sublime text 2
- MapReduce练习(一)