【发布时间】:2013-06-18 22:27:50
【问题描述】:
我目前正在使用 YouTube API 表单 Google,我正在尝试获取“viewCount”数组。我已经尝试过了,完全没有运气。 Here 是我当前使用的链接。
我以前试过这个,但一点运气都没有。
$url = 'http://gdata.youtube.com/feeds/api/users/gudjondaniel/uploads?max-results=1';
$source = file_get_contents($url);
$xml = new SimpleXMLElement($source);
$title = $xml->entry->viewCount;
非常感谢任何帮助。
【问题讨论】:
标签: php xml youtube-api simplexml xml-namespaces