Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$playlistID = '9C700F98F6D01E47';
$playlistURI = 'http://gdata.youtube.com/feeds/api/playlists/';
$ytData = simplexml_load_file($playlistURI . $playlistID . '?v=2');
echo "<br/><br/><br/>";
foreach ($ytData->entry as $video) {
echo '<h3>'.$video->title . '</h3>';
$videoMedia = $video->children("http://search.yahoo.com/mrss/")->group;
echo "<br/><br/>";
echo $videoMedia->videoid;
echo '<img src="' . $videoMedia->thumbnail->attributes()->url .'" />';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.