title: Thumbnail for picasa api
body: <p>I am using the picasa api to do a community search and now I want to put thumbnails on the search results too. How do I do this? I want the results to have thumbnails and clicking on a thumbnail should take you to the image in web album.</p>
  
  <pre><code>&lt;?php
  
  require_once 'Zend/Loader.php';
  
  Zend_Loader::loadClass('Zend_Gdata_Photos');
  Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
  Zend_Loader::loadClass('Zend_Gdata_AuthSub');
  Zend_Loader::loadClass('Zend_Gdata_Query');
  
  $search=$_REQUEST['id'];
  
  $serviceName = Zend_Gdata_Photos::AUTH_SERVICE_NAME;
  $user = "abc@gmail.com";
  $pass = "password";
  
  
  $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $serviceName);
  
  $gp = new Zend_Gdata_Photos($client, "Google-DevelopersGuide-1.0");
  
  // Community search queries aren't currently supported through a separate
  // class in the PHP client library.  However, we can use the generic 
  // Zend_Gdata_Query class as an alternative
  
  // URL for a community search request
  // Creates a Zend_Gdata_Query
  $query = $gp-&gt;newQuery("https://picasaweb.google.com/data/feed/api/all");
  
  // looking for photos in the response
  $query-&gt;setParam("kind", "photo");
  
  // full text search
  $query-&gt;setQuery($search);
  
  // maximum of 10 results
  $query-&gt;setMaxResults("6");
  
  // There isn't a specific class for representing a feed of community
  // search results, but the Zend_Gdata_Photos_UserFeed understands
  // photo entries, so we'll use that class
  $userFeed = $gp-&gt;getUserFeed(null, $query);
  foreach ($userFeed as $photoEntry) 
  {
   echo $photoEntry-&gt;getTitle()-&gt;getText() . "&lt;/br &gt; ";
  // The 'alternate' link on a photo represents the link to
  // the image page on Picasa Web Albums
  $link=$photoEntry-&gt;getLink('alternate')-&gt;getHref();
  echo "&lt;img src='".$link."'&gt;";
  echo '&lt;a href="'.$link.'"&gt;'.$photoEntry-&gt;getLink('alternate')-&gt;getHref().'&lt;/a&gt; &lt;br /&gt;';
  echo "&lt;br /&gt;\n";
  
  }
  
  ?&gt;
  </code></pre>