I've converted some code we've been using into an extension for importing
properly licensed photos from flickr into a Mediawiki installation:
http://www.mediawiki.org/wiki/Extension:ImportFreeImages
It makes use of the phpFlickr package for the API calls.
Feel free to play around with it here:
http://wikidiy.com/mediawiki-1.8.2/index.php/Special:ImportFreeImages
Travis