phpFlickr takes most of the grunt work out of authentication.
Authenticating people is one of the more hassle-prone features of the API. This is why it's a good idea to use an API wrapper: it handles the nitty-gritty details.
For PHP programmers, Dan Coulter's
phpFlickr does this job admirably well. I've
found it to be the most well supported of the PHP wrappers currently
available for Flickr. It even has its own web site, with documentation
and example code, located at http://www.phpFlickr.com.
This hack creates a web application that displays a few of a user's most recent photos. We'll use authentication so that we can display the user's Private photos as well as Public photos.
These scripts were written for PHP 4, so you'll need a web server with PHP 4 support.
You'll also need the
phpFlickr package of API wrappers, which is
available from http://www.phpFlickr.com. The package includes
This is the main source code file for
phpFlickr. The remaining files are
support files that are referenced from within phpFlickr.php.
This is a sample callback script for authentication that Dan provides. We'll be making some modifications to it.
This source file, written by Aaron Colflesh, provides an
XML parser that is used by
This directory contains source code for PEAR database
access, which is used to implement
phpFlickr's optional caching feature. I highly recommend that you install this code and use ...