I'm working with the youtube v3 api. After a few tests, I realized that I need some help. When I'm trying to display the xml content, I'm just getting null values. Can anybody help me?
If you want to see the xml:
https://www.youtube.com/feeds/videos.xml?channel_id=$channelid
And my code is:
$xml=simplexml_load_file("videos.xml");
foreach($xml as $content) {
echo $content->title . "<br>";
echo $content->link['href'] . "<br>";
}
Xml that I want to display:
<entry>
Video ID <yt:videoId>Q4vSZA_8kYY</yt:videoId>
Video title <title>¡Trailer del canal! CBPrductions</title>
Upload date <published>2016-01-14T07:37:03+00:00</published>
<media:group>
Description <media:description>
LIKE PORQUE LO DIGO YO _ Suscribete!: https://www.youtube.com/user/SpanishCBProductions Dale a LIKE a mi página Facebook: https://www.facebook.com/SpanishCBProductions Sigueme en TWITTER!: https://twitter.com/CcristianN3 Y en mi poco sexy INSTAGRAM: http://instagram.com/ccristiann3/
</media:description>
</media:group>
</entry>