Location: PHPKode > scripts > Flickr API Wrapper > flickr-api-wrapper/example.php
<?php

$api_key = 'your_flickr_api_key_here';

$flickr = new Flickr($api_key);

$params = array
(
    'user_id'  => 'your_flickr_user_nsid',
    'extras'   => 'url_m,url_sq',
    'per_page' => 10,
);

$result = $flickr->call('people.getPublicPhotos', $params);

foreach ($result->photos->photo as $photo)
{
    $p = $flickr->call('photos.getInfo', array('photo_id' => $photo->id));

    echo '<h2>'.$photo->title.'</h2>';
    echo '<a href="'.$photo->url_m.'"><img src="'.$photo->url_sq.'" alt="" /></a><br />';
    echo nl2br($p->photo->description->_content);
}

// Example using chaining

$result = Flickr::factory($api_key)->call('people.getPublicPhotos', $params);
Return current item: Flickr API Wrapper