$file_contents = file_get_contents("http://vimeo.com/api/v2/group/awesome/videos.json"), true);
Run Code Online (Sandbox Code Playgroud)
使用以下方法将其读入变量:
$data = json_decode($file_contents);
Run Code Online (Sandbox Code Playgroud)
然后您可以使用以下方式访问零件:
echo $data->id;
echo $data->title;
Run Code Online (Sandbox Code Playgroud)
等等
只是print_r($data);用来查看所有可用字段.
| 归档时间: |
|
| 查看次数: |
6428 次 |
| 最近记录: |