![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
接口
fcjboke
这个作者很懒,什么都没留下…
展开
-
curl模拟post请求提交
header('content-type:text/html;charset=utf-8'); function curlPost($url,$data,$method){ $ch = curl_init(); //1.初始化 curl_setopt($ch, CURLOPT_URL, $url); //2.请求地址 curl_setopt($ch, CURLO原创 2017-05-06 21:09:24 · 276 阅读 · 0 评论 -
当file_get_contents或者simplexml_load_file的时候乱码
乱码有几种可能如下: 1.页面能获取过来,只是内容乱码而已:可以采用iconv()和mb_convert_encoding()函数进行转码即可 2.当内容都无法正常获取的时候,分两种情况第一种是防盗链,第二种是页面需要解压 2.1防盗链情况下解决办法比较简单,模拟浏览器就可以了 [php] view plain copy header('cont原创 2017-05-06 21:10:30 · 355 阅读 · 0 评论