PHP code example of survos / flickr-bundle

1. Go to this page and download the library: Download survos/flickr-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

survos / flickr-bundle example snippets


$flickr->authenticate($accessToken, $accessTokenSecret);

$tags = $flickr->tagHashToString([
    'news:publication' => 'Daily News',
    'news:issue' => '1924-05-18',
    'news:page' => 5,
    'news:record' => 'ad-0001',
    '_' => ['newspaper advertising', 'retail'],
]);
$result = $flickr->uploader()->upload(
    $filename,
    title: $title,
    description: $sourceCitation,
    tags: $tags,
    isPublic: false,
    isFriend: false,
    isFamily: false,
    contentType: 3,
    hidden: 2,
    safetyLevel: 1,
);
if ($result['stat'] !== 'ok') {
    throw new \RuntimeException(sprintf('Flickr %s: %s', $result['code'], $result['message']));
}
$photoId = $result['photoid']; // String: store this with the source record and file hash.