$url="http://so.ard.iyyin.com/v2/songs/search?v=v7.1.0.2014042118&page=1&q=%E5%8C%86%E5%8C%86%E9%82%A3%E5%B9%B4&size=2"; $all=array(json_decode(file_get_contents($url))); $all=object2array($all[0]); print_r($all); function object2array(&$object) { $object = json_decode( json_encode( $object),true); return $object; }
用这API写的