Created
November 28, 2010 12:23
-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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