Saturday, April 17, 2010

What is the RSS feed for Flickr photos with two tags?

I am trying to get/make an rss feed for public flickr photos with TWO tags. Specifically, I want "valentine" and "cupcakes", so all the images need to have both tags. I have found lots of resources on how to do one tag (cupcakes):

but not two. I don't know how to do much coding, for example this looks too complicated:

Can someone please find me the formula?

What is the RSS feed for Flickr photos with two tags?
In its RSS feeds, Flickr doesn't let you get photos tagged with all tags you tell it in an RSS feed, so I whipped up a script that, if you have your own server, creates RSS feeds of the tags you specify. If you called it 'multitags.php', and you put it on your site, say, the URL would look something like That would get you an RSS feed (in a format very similar to the format of the RSS feeds that Flickr outputs) of photos that are tagged with both 'vancouver' and 'seawall'.

If you used a comma instead of a plus, it looks for photos tagged with either of the tags, so would get you photos tagged with 'vancouver' mixed in with the photos tagged with 'seawall'. There is a way to get RSS feeds of tags this way, but why figure that out. How to do it is in a forum somewhere, but I couldn't remember where, so I just coded that into the script.

You'll need two things to use the script: the excellent phpFlickr library (support for uploading coming, nice!) and a Flickr API key, which you can get at You'll need to change the three variables at the top of the script, which follows, accordingly.

A note about the code: the first little bit about the XML declaration making up multiple lines is a workaround for the code dispaly. And yes, there are a lot of print statements. It makes it easier for me to debug.

It's probably best to keep the URL secret, so that the only person hitting the script is you. The RSS feeds work for me in NetNewsWire, but please do submit bug reports in the comments.
Reply:I don't consider this the best answer to my question, because it is not even a good one. Report It

teeth braces

No comments:

Post a Comment