Printing out Video thumbnails for a user's upload feed

A quick helper function to print thumbnails for all entries in a user's upload feed.
<php
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_YouTube');

function printThumbnails($username)
{
  $yt = new Zend_Gdata_YouTube();
  $userVideoFeed = $yt->getUserUploads($username);

  foreach($userVideoFeed as $videoEntry) {
    print "

Thumbnails for entry $videoEntry->title

"; $videoThumbnails = $videoEntry->getVideoThumbnails(); foreach($videoThumbnails as $videoThumbnail) { echo $videoThumbnail['time'] . ' -- ' . '<img src="' . $videoThumbnail['url']. '" height=' . $videoThumbnail['height'] . ' width=' . $videoThumbnail['width'] . ' />'; } } } ?>

3 comments:

  1. The front cover and identity for the collection. Typography constructed from samples of each print design in the collection. Printing

    ReplyDelete
  2. Likes greatly elevate the attractiveness in your website page and using the ideal range rely; several of us will probably be drawn to your account. The corporations which supply these expert solutions, will give you with non-automated or robotic likes and provide you with true Instagram likes. instagram likes buy The great make a difference concerning this is frequently that they can be instantly transported to the account so you don't have to attend that significantly. And when you're a company, soaring your Instagram likes will be handy.

    ReplyDelete