Clone wiki

PicasaSSP / Home


usernamestringnullPicasaSSP will scrape all public albums for this user
albumsarraynullArray of album feed URLs to scrape, either public or private
album_thumbstring'72-c'Album thumbnail size, see below for explanation of Picasa photo sizes
photo_thumbstring'32-c'Photo thumbnail size, see below for explanation of Picasa photo sizes
photo_size_wstring'512'Width for landscape photos
photo_size_hstring'400'Height for portrait photos
add_linkbooleantrueWhether or not to include a link to the raw photo
link_sizestring'800'Size of linked photo
add_captionbooleanfalseWhether to add the photo's description field as the photo caption
https_to_httpbooleantrueServe all photos over http, even private albums
xml_filestring'xml/new_file.xml'Relative path for new XML file

To include private albums, you'll need to provide the full URL for each feed. This can be found on the right side of the screen when viewing the album in Picasa's web interface - the 'RSS' link. The authkey parameter must be included in the URL.

Read more about Available sizes below


$options = array(
   'username' => 'my_username',
   'albums' => array(
   'add_captions' => true,
   'xml_file' => '../files/xml/descriptive_name.xml'

$xml = new PicasaSSP($options);

Note: Even if you only have one album, still enter as array.


build_xml($debug = false)


  • Name: $debug
  • Default: false
  • Description: When true XML file will be generated and saved, when false it will be only be returned as a string


Method returns a multidimensional array with the following data:

For each album processed:

$result['albums'] => Array
      ['title'] => Album title
      ['description'] => Album description
      ['thumbnail'] => Album thumbnail URL
      ['photo_count'] => Number of photos



$result['xml'] => Array
      ['status'] => 'Success' if file was created successfully, or 'error'
      ['size'] => Size of created file in bytes
      ['path'] => Full (absolute) path of created file
      ['elapsed'] => XML generation time in seconds


$result['xml'] => Array
      ['string'] => XML file as string
      ['elapsed'] => XML generation time in seconds


Generate XML for only my public albums with default settings:



// Set options
$options = array('username' => 'me');

// Create object
$xml = new PicasaSSP($options);

// Build XML in debug mode (not creating a file)
$result = $xml->build_xml(true);

// Print XML data to screen
echo '<pre>';
echo '</pre>';

// Do something with album info
foreach ($result['albums'] as $album)
   echo '<p>' . $album['title'] . ' has ' . $album['photo_count'] . ' photos!</p>'; 


Image Sizes

There are many size options available from Picasa. The following sizes are available in both cropped (square) and uncropped formats:
32, 48, 64, 72, 104, 144, 150, 160

The following sizes are available only as uncropped:
94, 110, 128, 200, 220, 288, 320, 400, 512, 576, 640, 720, 800, 912, 1024, 1152, 1280, 1440, 1600

To request cropped images, append '-c' to the desired size, e.g. 150 cropped: '150-c'.

These sizes apply to the photo's longest side. A size of 400 would be the width of a landscape photo, or the height of a portrait photo. The script lets you specify what size you want based on orientation. The parameter 'photo_size_w' is the size (width) of landscape photos, and 'photo_size_h' is the size (height) of portrait photos.