hi all,
does anyone know how to list all the videos from a YouTube playlist or upload list in php.
what i want to do is list my videos on my own site without having to add code to the page every time i make a video.
thanks in advance.
p.s
i want them listed individually like when you look at someones uploaded videos.
http://gdata.youtube.com/feeds/api/playlists/PLAYLIST_ID
[php]
<?php $cont = json_decode(file_get_contents('http://gdata.youtube.com/feeds/api/playlists/[PLAYLIST_ID]/?v=2&alt=json&feature=plcp')); ?> <?php $feed = $cont->feed->entry; ?> <?php if(count($feed)): foreach($feed as $item): // youtube start ?> <?php echo $item->title->{'$t'} ?><?php echo $item->{'media$group'}->{'media$description'}->{'$t'} ?> <?php endforeach; endif; // youtube end ?>
[/php]
source : http://stackoverflow.com/questions/4607855/getting-videos-from-a-users-playlist-youtube-api
you can try that , i dont do google api so i searched google and came up with that