Skip to content

Instantly share code, notes, and snippets.

@rtgibbons
Created April 28, 2010 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtgibbons/382483 to your computer and use it in GitHub Desktop.
Save rtgibbons/382483 to your computer and use it in GitHub Desktop.
<?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