'97281e87ae7c50f5b430f1e45290e167', 'method' => 'flickr.photos.search', 'text' => $word, 'tags' => $taglist, 'per_page' => $numResults, 'page' => $pgNum, 'sort' => 'relevance', 'format' => 'php_serial', ); $encoded_params = array(); foreach ($params as $k => $v){ $encoded_params[] = urlencode($k).'='.urlencode($v); } # # call the API and decode the response # $url = "http://api.flickr.com/services/rest/?".implode('&', $encoded_params); $rsp = file_get_contents($url); $rsp_obj = unserialize($rsp); ?> Flickr Thumbnail Search
word: number of images: page:
http://static.flickr.com/2/1418878_1e92283336_m.jpg server-id: 2 photo-id: 1418878 secret: 1e92283336 size: m */ # # display the photo title (or an error if it failed) # # http://static.flickr.com/{server-id}/{id}_{secret}_o.(jpg|gif|png) if ($rsp_obj['stat'] == 'ok'){ foreach ($rsp_obj['photos']['photo'] as $photo){ echo ""; echo ""; flush(); } //$photo_title = $rsp_obj['photo']['title']['_content']; }else{ echo "Call failed!"; } ?>