Flickr Photo Downloader Script

While on my exchange in Finland, my friends from other countries and I took many pictures. We wanted to share pictures, but most of them didn’t know how to use a computer so well. Some burned CDs with pictures and sent them to everyone but it was a lot of work!!! So my friend Camre from Turkey made a script that allows people to easily download all of the pictures from any photoset in flickr. But his script wasn’t working anymore on his server, so I decided to make a new one. I was looking for a simple flickr library, and I found one in Oberkampf, it’s easy and very configurable.

My objective was to make a script that, when you set a user, it would show all of his photosets, and when clicking on one of those, it would make a list of the photos linking the photo to the maximum size on flickr. So, using a download manager (in Firefox, I used Flashgot and FlashGet) you could simply download all the pictures in max size from a photoset.

 

I made a lot of changes to the code to get to this. The script is working fine, so I decided to release it on the internet, making it available to everyone.

 

Downloading:

    Download the latest version of the script from here.

 

Installing:

    To install the script on your server, you have to upload all files to the same dir, and create a folder called “cache” with the chmod “777“.

     

    Open the “library.php” and change the $config[‘user’]=”” to your user ID. To help get this ID, you can go to THIS website.
    For example: $config[‘user’]=”44441834@N00″;

     

    You also need to add the username in $config[‘username’]=””;
    For example: $config[‘username’]=”pasteler0″;

     

    If you want to show your private photosets, you can set the email you are using on your flickr account in $config[’email’]=””; or your flickr password in $config[‘password’]=””;

 

Customizing:

    If you want to change the style, you simply edit the flickr.css file.

 

FAQ:

    How do I download the pictures?

    When you select the photoset, the script will create a list with a link to all photos in the set with a bigger size available. Having flashgot installed, you right click and select the option “Flashgot all“. After that it will open in the download manager you have configured.

     

    The pictures have strange name, how do I fix this?

    These names are the original names in flickr. You can change the name of the file to the title as a bunch using Flashget.
    After you have downloaded all pictures, go to the Download Folder in Flashget, select the files you want to change the name,Right Mouse -> Rename -> Comment as Filename and you are done!

 

Obs:

  • You can find this script working on my pictures here.
  • Remember that it is not legal to download pictures without the permission of the owner/photographer, this script shouldn’t be used to steal pictures.

 

Hope you enjoyed this script. If you liked, have any question or advice, please, just leave a comment.

Comments

  1. Hey I love this script. This made it easy to download my pictures and my sister’s pictures.

    I had to change a few lines though

    line 229 of library.php became:
    $set_image = ‘http://static.flickr.com/’. $server . “/” . $primary.’_’.$secret.”.$setup_size.’.jpg’;

    line 320:
    $raw_url = ‘http://static.flickr.com/’. $server . “/” . $photo_id.’_’.$secret;

    line 321
    $photo_url = ‘http://static.flickr.com/’. $server . “/” . $photo_id.’_’.$secret.”.$setup_size.’.jpg’;

    After that worked like a charm. Thanks much

  2. In Geoff’s correction, you need to replace the round quotes and double quotes by straight ones… THEN it really works like a charm. THANKS!!!

  3. Thanks a lot for the script. I’m using it for downloading my contacts’ photos. But i can’t see one of my contact’s photo sets. His gallery is only open for his friends and only his friends can get photos. So this script doesn’t work for his account. Is there any solution for this problem.

  4. thnx for the sc.

    we can’t find the solution about this script.

    we can’t download it :S

    how should we do it? can u send me an e-mail about it.

    we,3 guys tried but can’t find any solution,pls help us

  5. also i changed quotes with the straight ones like sjoerd’s message.

    ex:

    $set_image = ‘http://static.flickr.com/’. $server . ‘/’ . $primary.’_’.$secret.’.$setup_size.’.jpg’;

    it still didn’t work :S

  6. The script works if you follow Geoff’s and Sjoerd’s corrections if you change the download hostname to http://farm1.static.flickr.com/, but only for photos uploaded before early 2007.
    For all photos uploaded after about March or April, the script calculates the wrong secret, and therefore is unable to point to the correct location.
    I don’t have a solution, except to download those manually…

  7. Yeah, I made this script when there was no farm servers. I’ll try to update the script in the future. But if you make some changes that work, please, share the code with us. 🙂

  8. script working perfect

    problem is dns servers

    change your hosts file in this folder “C:\WINDOWS\system32\drivers\etc\”

    # Copyright (c) 1993-1999 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host

    name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a ‘#’ symbol.
    #
    # For example:
    #
    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    68.142.232.116 photos1.flickr.com
    68.142.232.116 photos2.flickr.com
    68.142.232.116 photos3.flickr.com
    68.142.232.116 photos4.flickr.com
    68.142.232.116 photos5.flickr.com
    68.142.232.116 photos6.flickr.com
    68.142.232.116 photos7.flickr.com
    68.142.232.116 photos8.flickr.com
    68.142.232.116 photos9.flickr.com
    68.142.232.116 photos10.flickr.com
    68.142.232.116 photos11.flickr.com
    68.142.232.116 photos12.flickr.com
    68.142.232.116 photos13.flickr.com
    68.142.232.116 photos14.flickr.com
    68.142.232.116 photos15.flickr.com
    68.142.232.116 photos16.flickr.com
    68.142.232.116 photos17.flickr.com
    68.142.232.116 photos18.flickr.com
    68.142.232.116 photos19.flickr.com
    68.142.232.116 photos20.flickr.com
    68.142.232.116 photos21.flickr.com
    68.142.232.116 photos22.flickr.com
    68.142.232.116 photos23.flickr.com
    68.142.232.116 photos24.flickr.com
    68.142.232.116 photos25.flickr.com
    68.142.232.116 photos26.flickr.com
    68.142.232.116 photos27.flickr.com
    68.142.232.116 photos28.flickr.com
    68.142.232.116 photos29.flickr.com
    68.142.232.116 photos30.flickr.com
    68.142.232.116 photos31.flickr.com
    68.142.232.116 photos32.flickr.com
    68.142.232.116 photos33.flickr.com
    68.142.232.116 photos34.flickr.com
    68.142.232.116 photos35.flickr.com
    68.142.232.116 photos36.flickr.com
    68.142.232.116 photos37.flickr.com
    68.142.232.116 photos38.flickr.com
    68.142.232.116 photos39.flickr.com
    68.142.232.116 photos40.flickr.com
    68.142.232.116 photos41.flickr.com
    68.142.232.116 photos42.flickr.com
    68.142.232.116 photos43.flickr.com
    68.142.232.116 photos44.flickr.com
    68.142.232.116 photos45.flickr.com
    68.142.232.116 photos46.flickr.com
    68.142.232.116 photos47.flickr.com
    68.142.232.116 photos48.flickr.com
    68.142.232.116 photos49.flickr.com
    68.142.232.116 photos50.flickr.com
    68.142.232.116 photos51.flickr.com
    68.142.232.116 photos52.flickr.com
    68.142.232.116 photos53.flickr.com
    68.142.232.116 photos54.flickr.com
    68.142.232.116 photos55.flickr.com
    68.142.232.116 photos56.flickr.com
    68.142.232.116 photos57.flickr.com
    68.142.232.116 photos58.flickr.com
    68.142.232.116 photos59.flickr.com
    68.142.232.116 photos60.flickr.com
    68.142.232.116 photos61.flickr.com
    68.142.232.116 photos62.flickr.com
    68.142.232.116 photos63.flickr.com
    68.142.232.116 photos64.flickr.com
    68.142.232.116 photos65.flickr.com
    68.142.232.116 photos66.flickr.com
    68.142.232.116 photos67.flickr.com
    68.142.232.116 photos68.flickr.com
    68.142.232.116 photos69.flickr.com
    68.142.232.116 photos70.flickr.com
    68.142.232.116 photos71.flickr.com
    68.142.232.116 photos72.flickr.com
    68.142.232.116 photos73.flickr.com
    68.142.232.116 photos74.flickr.com
    68.142.232.116 photos75.flickr.com
    68.142.232.116 photos76.flickr.com
    68.142.232.116 photos77.flickr.com
    68.142.232.116 photos78.flickr.com
    68.142.232.116 photos79.flickr.com
    68.142.232.116 photos80.flickr.com
    68.142.232.116 photos81.flickr.com
    68.142.232.116 photos82.flickr.com
    68.142.232.116 photos83.flickr.com
    68.142.232.116 photos84.flickr.com
    68.142.232.116 photos85.flickr.com
    68.142.232.116 photos86.flickr.com
    68.142.232.116 photos87.flickr.com
    68.142.232.116 photos88.flickr.com
    68.142.232.116 photos89.flickr.com
    68.142.232.116 photos90.flickr.com
    68.142.232.116 photos91.flickr.com
    68.142.232.116 photos92.flickr.com
    68.142.232.116 photos93.flickr.com
    68.142.232.116 photos94.flickr.com
    68.142.232.116 photos95.flickr.com
    68.142.232.116 photos96.flickr.com
    68.142.232.116 photos97.flickr.com
    68.142.232.116 photos98.flickr.com
    68.142.232.116 photos99.flickr.com
    68.142.232.116 photos100.flickr.com
    68.142.232.116 photos101.flickr.com
    68.142.232.116 photos102.flickr.com
    68.142.232.116 photos103.flickr.com
    68.142.232.116 photos104.flickr.com
    68.142.232.116 photos105.flickr.com
    68.142.232.116 photos106.flickr.com
    68.142.232.116 photos107.flickr.com
    68.142.232.116 photos108.flickr.com
    68.142.232.116 photos109.flickr.com
    68.142.232.116 photos110.flickr.com
    68.142.232.116 photos111.flickr.com
    68.142.232.116 photos112.flickr.com
    68.142.232.116 photos113.flickr.com
    68.142.232.116 photos114.flickr.com
    68.142.232.116 photos115.flickr.com
    68.142.232.116 photos116.flickr.com
    68.142.232.116 photos117.flickr.com
    68.142.232.116 photos118.flickr.com
    68.142.232.116 photos119.flickr.com
    68.142.232.116 photos120.flickr.com
    68.142.232.116 photos121.flickr.com
    68.142.232.116 photos122.flickr.com
    68.142.232.116 photos123.flickr.com
    68.142.232.116 photos124.flickr.com
    68.142.232.116 photos125.flickr.com
    68.142.232.116 photos126.flickr.com
    68.142.232.116 photos127.flickr.com
    68.142.232.116 photos128.flickr.com
    68.142.232.116 photos129.flickr.com
    68.142.232.116 photos130.flickr.com
    68.142.232.116 photos131.flickr.com
    68.142.232.116 photos132.flickr.com
    68.142.232.116 photos133.flickr.com
    68.142.232.116 photos134.flickr.com
    68.142.232.116 photos135.flickr.com
    68.142.232.116 photos136.flickr.com
    68.142.232.116 photos137.flickr.com
    68.142.232.116 photos138.flickr.com
    68.142.232.116 photos139.flickr.com
    68.142.232.116 photos140.flickr.com
    68.142.232.116 photos141.flickr.com
    68.142.232.116 photos142.flickr.com
    68.142.232.116 photos143.flickr.com
    68.142.232.116 photos144.flickr.com
    68.142.232.116 photos145.flickr.com
    68.142.232.116 photos146.flickr.com
    68.142.232.116 photos147.flickr.com
    68.142.232.116 photos148.flickr.com
    68.142.232.116 photos149.flickr.com
    68.142.232.116 photos150.flickr.com
    68.142.232.116 photos151.flickr.com
    68.142.232.116 photos152.flickr.com
    68.142.232.116 photos153.flickr.com
    68.142.232.116 photos154.flickr.com
    68.142.232.116 photos155.flickr.com
    68.142.232.116 photos156.flickr.com
    68.142.232.116 photos157.flickr.com
    68.142.232.116 photos158.flickr.com
    68.142.232.116 photos159.flickr.com
    68.142.232.116 photos160.flickr.com
    68.142.232.116 photos161.flickr.com
    68.142.232.116 photos162.flickr.com
    68.142.232.116 photos163.flickr.com
    68.142.232.116 photos164.flickr.com
    68.142.232.116 photos165.flickr.com
    68.142.232.116 photos166.flickr.com
    68.142.232.116 photos167.flickr.com
    68.142.232.116 photos168.flickr.com
    68.142.232.116 photos169.flickr.com
    68.142.232.116 photos170.flickr.com
    68.142.232.116 photos171.flickr.com
    68.142.232.116 photos172.flickr.com
    68.142.232.116 photos173.flickr.com
    68.142.232.116 photos174.flickr.com
    68.142.232.116 photos175.flickr.com
    68.142.232.116 photos176.flickr.com
    68.142.232.116 photos177.flickr.com
    68.142.232.116 photos178.flickr.com
    68.142.232.116 photos179.flickr.com
    68.142.232.116 photos180.flickr.com
    68.142.232.116 photos181.flickr.com
    68.142.232.116 photos182.flickr.com
    68.142.232.116 photos183.flickr.com
    68.142.232.116 photos184.flickr.com
    68.142.232.116 photos185.flickr.com
    68.142.232.116 photos186.flickr.com
    68.142.232.116 photos187.flickr.com
    68.142.232.116 photos188.flickr.com
    68.142.232.116 photos189.flickr.com
    68.142.232.116 photos190.flickr.com
    68.142.232.116 photos191.flickr.com
    68.142.232.116 photos192.flickr.com
    68.142.232.116 photos193.flickr.com
    68.142.232.116 photos194.flickr.com
    68.142.232.116 photos195.flickr.com
    68.142.232.116 photos196.flickr.com
    68.142.232.116 photos197.flickr.com
    68.142.232.116 photos198.flickr.com
    68.142.232.116 photos199.flickr.com
    68.142.232.116 photos200.flickr.com

  9. Hello,

    What a great script idea. Would it be very complicated to make the script download all the photos from a group rather than a set?

    I would like to compile a book from the photos of a group I set up so that the users of that group can get themselves a cool book of images which they have contributed to.

    Obviously I would ensure that the images in question are ok to be printed, but I am sure they would be 🙂

    Regards

    Steve

  10. Flickr is really a great way to share photos on the net, the photo resizing feature of Flickr is what i like.”`

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.