PHP调用接口以及JSON的解析(fopen feof fread fclose)

$handle = fopen("http://www.qttc.net/api.php?action=getBlogList&recommend=1&limit=5","rb");
$content = "";
while (!feof($handle)) {
    $content .= fread($handle, 10000);
}
fclose($handle);
$content = json_decode($content);

 

posted @ 2016-04-10 11:44  哟风  Views(375)  Comments(0)    收藏  举报