Skip to content

Instantly share code, notes, and snippets.

@mindbrix
Created November 28, 2010 12:23
Show Gist options
  • Save mindbrix/718874 to your computer and use it in GitHub Desktop.
Save mindbrix/718874 to your computer and use it in GitHub Desktop.
A simple utility to extract an array of full size Picasa web image URLs for a given user and album. Written for http://vectoria.co.uk/gallery/
<?php
// http://code.google.com/p/picasaphp/
//
require_once("Picasa.php" );
/* Return an array of full size Picasa web image URLs
*
* Written for http://vectoria.co.uk/gallery/
*/
function getImagesFullSize( $userName, $albumName )
{
$imagesList = array();
$picasa = new Picasa();
$albums = $picasa->getAlbumsByUsername( $userName );
$albums_array = $albums->getAlbums();
foreach( $albums_array as $album )
{
if( $album->getTitle() == $albumName )
{
$picasa_album = $picasa->getAlbumById( $userName, $album->getIdnum(), null, null, null, null, null, null );
$picasa_images = $picasa_album->getImages();
foreach( $picasa_images as $image )
{
$imagesList[] = $image->getContent();
}
}
}
return $imagesList;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment