Get Total Results Youtube Api PHP
Hey, well right now I'm parsing youtube's api
demo url :
http://gdata.youtube.com/feeds/api开发者_JS百科/videos/-/test?orderby=viewCount&start-index=1&max-results=50
i'm using simplexml_load_file
the thing is, what should i do to retrieve the
<openSearch:totalResults>9477</openSearch:totalResults>
any ideas?
Thanks
$feedURL = "http://gdata.youtube.com/feeds/api/videos?q=test&orderby=viewCount&start-index=1&max-results=1";
$sxml = simplexml_load_file($feedURL);
$counts = $sxml->children('http://a9.com/-/spec/opensearchrss/1.0/');
$total = $counts->totalResults;
精彩评论