Hi, how do I get information about a photo like the author, the license using PHP?
+3
A:
This information is all available through the Flickr API, if you poke around their docs you may find what you're looking for.
Jeremy Banks
2008-11-19 06:59:57
how do I use the Flickr API with php?
2008-11-19 09:08:35
+2
A:
You need to use Flickr's publically avaliable API. Sign up for an API key then have a look at this page (which gives you a basic introduction to contacting the API and parsing serialized PHP. Personally I prefer using XML with SimpleXML).
You may find it easier to use one of the following packages:
Consult the documentation for info on using them.
Ross
2008-11-20 11:58:43
+2
A:
You call a HTTP REST query, and load the results as a string:
$query = "http://api.flickr.com/services/rest/?method=flickr.photos.getInfo&api_key=" . API_KEY . "&photo_id=" . $photoid . "&format=json&nojsoncallback=1";
data = json_decode(file_get_contents($query));
echo "created by: " . data->photo->owner->username;
echo "link to photopage: " . "http://www.flickr.com/photos/" . data->photo->owner->nsid; . "/" . data->photo->id;
You do this for whatever pieces of data you need from whichever REST calls you require.
All of this is available via the flickr api
Jeff Winkworth
2009-02-17 20:08:52