|
@@ -161,8 +161,9 @@ class User extends Api
|
|
curl_setopt($ch, CURLOPT_URL, $url); //设置访问的URL
|
|
curl_setopt($ch, CURLOPT_URL, $url); //设置访问的URL
|
|
curl_setopt($ch, CURLOPT_HEADER, false); //设置不需要头信息
|
|
curl_setopt($ch, CURLOPT_HEADER, false); //设置不需要头信息
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);//只获取页面内容,但不输出
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);//只获取页面内容,但不输出
|
|
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // 信任任何证
|
|
|
|
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); // 表示不检查证书
|
|
|
|
|
|
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
|
|
|
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
|
|
|
+ curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
|
|
|
|
|
$str = curl_exec($ch); //执行访问,返回结果
|
|
$str = curl_exec($ch); //执行访问,返回结果
|
|
curl_close($ch); //关闭curl,释放资源
|
|
curl_close($ch); //关闭curl,释放资源
|