php 通过curl获取接口数据
public function test()
{
url = 'http://xxx.com';
$getdata = $this->curl_get($url);
$getdata = json_decode($getdata, true);//对象转数组
}
public function curl_get($url=''){
$header = array(
'Accept: application/json',
);
$curl =.
原创
2020-09-18 17:03:14 ·
714 阅读 ·
0 评论