|
楼主 |
发表于 2019-10-21 22:23:38
|
显示全部楼层
我的是- if(substr($url,0,5)=='https'){
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- if($post){
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
- }
- if($cookie){
- curl_setopt($ch, CURLOPT_COOKIE, $cookie);
- }
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- return curl_exec($ch);
- }
复制代码 |
|