<?php
$url="接口地址";
//發送請求獲取返回值,file_get_contents只支持get請求,post使用curl
$json = file_get_contents($url);
//把json數據轉化成數組
$data = json_decode($json,true);
//打印看看
print_r($data);
><?php
$url="接口地址";
//發送請求獲取返回值,file_get_contents只支持get請求,post使用curl
$json = file_get_contents($url);
//把json數據轉化成數組
$data = json_decode($json,true);
//打印看看
print_r($data);
>