Skip to content


Version 2.1.0 Released!

This new version of phpFlickr has a few bug fixes, as well as an up-to-date method list. You'll also find that buildPhotoURL supports the new syntax for photo URLs, including the new originalsecret property and the new farm property. If you find any bugs, feel free to leave a comment here and I'll try to fix them as quickly as possible. If Flickr puts out a new API method, don't forget that you can use the call() method to call the method.

Head over to the phpFlickr download page on SourceForge to get the latest file release.

Posted in Uncategorized.


17 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Lars Olesen says

    Great work. It is really easy to use. What about releasing the software as a PEAR channel, so it would be easier to update and rely on your library?

    ReplyReply
  2. Bodo says

    Hi!

    At the moment I can't get any pictures. The examples on this page show the same error. Retrieving a Person doesn't work.

    Bodo

    ReplyReply
  3. Dan says

    I saw this problem too. It seems to have gone away, however. I'm guessing that my server was just having a temporary problem connecting to the Flickr API.

    ReplyReply
  4. Beth says

    Work great, the URL is correct (farm1) – however, using the CalendarFlickr script – buildPhotoURL() is still pulling an incorrect farm name (farm). So strange…

    ReplyReply
  5. Chris says

    Hi Dan,

    First up thanks for the code! I'm not getting the originalsecret part of the URL when I call buildPhotoURL. So it ends up with URLS liks http://farm1.static.flickr.com/19/101994314__o. Any ideas?

    All the best,

    Chris.

    ReplyReply
  6. Dan says

    Chris,

    Depending on which method you call, it may not return the original secret or original format. You can use the extras parameter and add "original_secret" and "original_format" to get those. I think those extras tags are not documented at the moment.

    ReplyReply
  7. Chris says

    Hi Dan – thanks that works perfectly now (used the extras parameter with flickr.photos.search.

    Chris.

    ReplyReply
  8. Josh says

    I love your library and decided to use it with a plugin I have been working on for wordpress. I have come across an issue dealing with multiple instances of phpflickr (and the accompanying libraries) being loaded due to multiple wordpress plugins using phpflickr. I have found a solution which involves a some small tweaks to your code. I'm not sure if it is the most elegant php solution but basically any place where you do a require_once call I have added a check to see if the given class that is to be loaded already exists.

    Here is an example:
    original code:
    require_once 'PEAR.php';

    new code:
    if(!class_exists("PEAR")) require_once 'PEAR.php';

    I thought perhaps you could add this to the next version of your library. Thanks again for all your hard work.

    ReplyReply
  9. Dan says

    Josh,

    That's a good point about the require_once calls. The problem, I realized, is that if you're including the same files from multiple locations, the "require_once" checks don't recognize them as the same file. Plugin developers should also use the class_exists function when they're including phpFlickr.php or it could try to load that class twice.

    ReplyReply
  10. Beth says

    Is there a way to pull all a users photos into an array? people_getPublicPhotos() only grabs the latest 500 from the stream.

    ReplyReply
  11. angela says

    unclear if this will work with php5? I'm hoping so!

    ReplyReply
  12. Dan says

    @Beth, If you use photos_search(), you can use the pagination arguments to get more than the initial 500 photos.

    @angela, phpFlickr will absolutely work on php5. This site is running php5 and it works just fine.

    ReplyReply
  13. Beth says

    Actually people_getPublicPhotos() supports pagination too, however I just can't get everything into a single array. Basically I found the total number of photos through people_getInfo(), divided it by 500 to get the number of pages. For each page, I grabbed the photos and stuck them into their own array. My problem lies in the fact I have no idea how to combine/concatenate them. If I do the usual dot selector and try to output it, I just get the last 500. It's like its overwriting the previous arrays.

    Does that make sense?

    ReplyReply
  14. Dan says

    Beth,

    Use php's array_merge() function on the arrays of photos.

    ReplyReply
  15. Beth says

    Ahhhh, I knew I was missing something – thanks! Worked perfectly!

    ReplyReply

Continuing the Discussion

  1. Jesse Warden - Flash, Flex, and Component Developer linked to this post on March 16, 2007

    FlickrMobile: A Flash Lite 2 Applicatio…

    *** Update 4.25.2006: Provided a Flash Player 6 version for PSP. *** Update: Yes, I used FAME (Flashout + ASDT + MTASC + Eclipse) to build this. Preface As has been reported by Scott F. and Scott J., the Flash……

  2. Social Poster » phpFlickr linked to this post on April 12, 2007

    [...] phpFlickr ยป Version 2.1.0 Released New version of phpFlickr has a few bug fixes, as well as an up-to-date method list. Youll also find that buildPhotoURL supports the new syntax for photo URLs, including the new originalsecret property and the new farm property [...]



Some HTML is OK

or, reply to this post via trackback.