I have lots of images in my Flickr account, over 35k uploaded from April 2005 until now. Searching them by date isn’t made easy: you first have to do a search and then in the advanced filters set a date range. The resulting search URL however is straightforward, and contains my user id, and both the start and end date to search in unix time.

To make it easy for myself I made a tiny tool that has a locally hosted webform where I enter a start and end date to search, and turns that into the right search URL which it shows as clickable hyper link. Meaning with two clicks I have the images I searched for by date in front of me (if they exist).

The small piece of code is shown below (save it as a .php file, insert your Flickr user ID, and run it on a local webserver on your laptop, add its URL to your bookmark bar in your browser)


<?php
/* form om te zoeken in Flickr */
$base="https://www.flickr.com/search/?user_id=YOURUSERID&sort=date-taken-desc&min_taken_date=";
if ($_POST) {
$dvan = $_POST['van'];
$dtot = $_POST['tot'];
$uvan = strtotime($dvan);
$utot = strtotime($dtot);
$searchurl=$base.$uvan."&max_taken_date=".$utot."&view_all=1"; echo "<a href=".$searchurl.">".$searchurl."</a>";
/* begin form */
}
?>
<form name="input_form" method="POST" action="<?php echo $_SERVER['PHP_SELF'] ?>">
Search Flickr (date format yyyy-mm-dd)<br/>
From <input type='text' size='20' name='van'><br/>
To <input type='text' size='20' name='tot'><br/> <br/>
<input type="submit" name="submitButton" value="Zoek">
</form>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.