" required /> <input type="submit" value="Search" /> </form> </div> <?php require_once 'flickr_API.php'; $key = '596dcd0930202d1c338ebb17261fae8c'; $Flickr = new FlickrAPI($key); $tags = isset($_GET['query']) ? $_GET['query'] : ''; $page = isset($_GET['page']) ? $_GET['page'] : 1; $back = $page - 1; $next = $page + 1; if (!empty($tags)) { //load search returned result page $res = $Flickr->search($tags, $page, '5'); } else { //load default page with recent uploaded images $res = $Flickr->getRecent(NULL, $page); } //print_r($res); // returns total number of pages $pages = $res['photos']['pages']; echo "<div class='image_group_wrapper'>"; foreach ($res['photos']['photo'] as $photo) { //prepare image url $photoThumbnailURL = $Flickr->getPhotoURL($photo, $size = "thumbnail"); //$imagePathLarge = "http://farm{$farmId}.staticflickr.com/{$serverId}/{$id}_{$secret}_b.jpg"; //prepare html for each image $id = $photo['id']; $title = $photo['title'];