phpFlickr 2.2.0, at long last!

Posted on Friday 18 January 2008

I'm still alive! Hooray! This new version of phpFlickr is all up to date with the brand new API calls. You know the drill… Download it at the SourceForge download page and try it out today.

Dan @ 12:52 am
Filed under: Uncategorized
Examples broken

Posted on Wednesday 17 October 2007

I was upgrading the blog to WordPress 2.3 and the examples broke. I'll get those up soon, I promise.

Update: They're working again.

Dan @ 9:00 pm
Filed under: Uncategorized
Collections a few months away

Posted on Monday 9 April 2007

In case you aren't on the Flickr API mailing list and you've been itching to use the new collections feature in your API application, Eric Costello responded to someone asking when "collections" will be available in the API:

Probably months. Could be sooner, but we have a whole lot of higher priority things going on right now, and before we release the APIs for collections there are some changes we need to make to how collections work (we're changing them to handle mixed content). We definitely know there is developer interest in the collection APIs, so we'll get to it as soon as possible. Thanks for your patience :)

I will be trying to update phpFlickr as soon as those API calls are available.

Dan @ 11:30 am
Filed under: Flickr News
Version 2.1.0 Released!

Posted on Thursday 22 February 2007

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.

Dan @ 6:16 pm
Filed under: Uncategorized
Upgrade and Cleanup

Posted on Friday 9 February 2007

I just upgraded this site to WordPress 2.1 and I repaired the documentation and forums. Please report any further problems you have with the website via my contact form. Because my policy of letting people sign up willy nilly had been abused, I have restricted registration now. If you would like to write an article about phpFlickr or about an application using phpFlickr, please contact me and I'll send you login information. To clean up the system, I deleted all user accounts who never wrote a legitimate post.

Hopefully I will have a new version of phpFlickr out some time next week to bring a couple of new API methods into the fold.

Dan @ 10:36 am
Filed under: Web Site News
Possible Upload Errors

Posted on Monday 4 December 2006

In case you're not on the Flickr API mailing list, some people are seeing a "Filesize 0" error when trying to upload photos.  Apparently all calls from a specific python wrapper are failing.  A few minutes ago, I tested uploading a photo with phpFlickr and I didn't see a problem, but I thought I would put this up here before I got inundated with emails from people having this problem.  The Flickr team is working on it and I'm sure they'll have it fixed as soon as possible.

Dan @ 8:17 pm
Filed under: Uncategorized
Updated Examples

Posted on Sunday 15 October 2006

I've updated all of the examples to work with version 2.0.0 of phpFlickr.

Dan @ 1:41 pm
Filed under: Uncategorized
So much spam!

Posted on Saturday 14 October 2006

I've just stuck some spam filtering code into the contact form on this site.  If it rejects any valid emails, leave me a comment and I'll try to fix the problem.

Dan @ 8:04 pm
Filed under: Uncategorized
phpFlickr Version 2.0.0 released!

Posted on Friday 29 September 2006

I've just put out the most significant update to phpFlickr ever.  It may very well break your current app.  I knew that just switching to the serialized php might introduce some differences, so I went ahead and cleaned up some mistakes I made back when I put out version 1.0.  Be sure to thoroughly test any apps if you are replacing an old version of phpFlickr with this one.  You can expect phpFlickr 2.x to be almost completely backwards compatible with everything that version 2.0.0 does.
Let me outline the major changes:

  1. Support for Flickr's new serialized PHP format.  This means no more mucking about with slow error-ridden XML parsers to get the results.  This also means that until 23 does the same thing, I'm suspending support for their API.  Download the latest 1.x version of phpFlickr to use 23.
  2. Better faster caching.  For high performance sites, I was doing some things that were pretty dumb when it came to database caching.  Now there is a class property that defines the maximum number of cached results it will allow before it runs the cleanup.  This way, it'll only trigger cleanup every once in a while.  The default is 1000, change this if you need it larger or smaller than this (1000 should be more than enough for most personal sites).
  3. Better error handling.  In this new version, the $die_on_error is set to false by default.  Every method will return a boolean false value if the API returns an error and you can access the error code and message using the getErrorCode() and getErrorMsg() methods.  In methods that alter data (e.g. photos_delete) will return a boolean true if there is no error state.  Of course, you can always turn the die_on_error flag if you want.

Get it while it's hot!

Dan @ 1:44 pm
Filed under: Uncategorized
Bug Fix: Post-Upload Problems

Posted on Friday 29 September 2006

Here's a quick bugfix for those of you who don't plan to upgrade to version 2.0.0 right away (because it'll break your apps). If you upload a file, you'll get an error on any Flickr methods you try to call after this. This is because the HTTP_Request object changes the post encoding when you upload a file and there's no systematic way to change it back. You can, however, throw the switch manually. Just stick the following code before the return statement in all of your upload functions in phpFlickr

$this->req->_requestHeaders['content-type'] = 'application/x-www-form-urlencoded';
unset($this->req->_postFiles['photo']);

Dan @ 8:10 am
Filed under: Bug Fixes