parseUrl($url, $cacheFile, 3600); $nrOfPhotos = count($photoSearchResult['photos'][0]['photo']); $photoIndex = rand(0, $nrOfPhotos - 1); $photo = $photoSearchResult['photos'][0]['photo'][$photoIndex]['attributes']; $photo['url'] = 'http://farm' . $photo['farm'] . '.static.flickr.com/' . $photo['server'] . '/' . $photo['id'] . '_' . $photo['secret'] . '.jpg'; return $photo; } $flickrApiKey = '462ae2dd98b225b5956925db0fc23361'; $photo = getRecentPhoto('25919616@N04'); ?> Popronde