php 请求json数据

在php中请求json接口,对返回的json数据进行解析,提取其中需要的数据

$url = '';
$file_contents=file_get_contents($url);
$data = json_decode($file_contents,TRUE);
echo $data['status'];

 

posted @ 2017-08-22 09:41  源氏九兵卫  阅读(171)  评论(0编辑  收藏  举报