$options["min_taken_date"] = $taken_start; $options["max_taken_date"] = $taken_end; $options["min_upload_date"] = $uploaded_start; $options["max_upload_date"] = $uploaded_end; } /* Set the default search to tag search */ if (!isset($flickr_method) || empty($flickr_method)) { $flickr_method = "tags"; } /* Call service only if the query is set, ignore otherwise */ if (isset($flickr_query) && !empty($flickr_query) && isset($flickr_key)) { /* Include the required class */ require_once "wso2/flickr/FlickrClient.php"; $flickr_client = new FlickrClient($flickr_key); if ($flickr_method === "text") { $res = $flickr_client->photosTextSearch($flickr_query, $options); } else { $res = $flickr_client->photosTagSearch($flickr_query, $options); } /* Check for the soap - fault */ if ($res["soap-fault"]) { $soap_reason = $res["soap-fault-reason"]; printf("SOAP fault : {$soap_reason}\n"); } elseif ($res["error"]) { $error_message = $res["error-msg"]; printf("Error Message: {$error_message}\n"); } elseif ($res["photos"] != NULL) { /* Calculating and Rendering the Number bar to access page by number */ $page = $res["page"]; $total = $res["total"];