Flickr-photos-search is a project mainly written in PHP, it's free.
Generating Flickr Photos URLs from YQL flickr.photos.search results.