
接口请求
zph同学
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
当file_get_contents或者simplexml_load_file的时候乱码
<?php header("content-type:text/html;charset=utf-8"); $url="http://wthrcdn.etouch.cn/WeatherApi?city=%E5%8C%97%E4%BA%AC"; $xml = simplexml_load_file("compress.zlib://".$url); $json=json_encode($xml);原创 2016-03-21 18:55:20 · 1650 阅读 · 0 评论 -
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, CURLOPT_CUSTOMREQUE原创 2016-03-11 14:14:16 · 9191 阅读 · 0 评论