}
    $flickr_infos = file_get_contents($service_url . '?action=subscription_status&url=' . urlencode($site_url));
    if (substr($flickr_infos, 0, 1) == '@') {
        $flickr_state = (bool) substr($flickr_infos, 1, 1);
        $flickr_last_update = substr($flickr_infos, 3);
    } else {
        $flickr_state = false;
    }
    /* Unique Photo */
    $description = "";
    if ($please_update) {
        $description .= "<h3><font color='red'>New Update available : " . $addon_name . " " . $last_version . ". Please update!</font> [ <a href='http://www.pixelpost.org/extend/addons/flickr-comments-grabber/'><font color='blue'>Download Link</font></a> ]</h3>";
    }
    $description .= "<h3>Retrieve comments</h3>";
    $description .= "<form action='" . $site_url . "admin/index.php?view=addons' method='post' accept-charset='UTF-8'>\n\tRetrieve the comments of all your photos. If you only want to retrieve the comments of a specified photo, enter the Flickr ID of the photo in the input text<br>\n\tDuration of the operation : 2 images per second.<br>\n\t<br>\n\tFlickr ID (<i>optional</i>) : <input type='text' size='10' value='' name='f_id'>\n\t<input type='submit' value='grab !' name='flickr_comments_update'>\n\t</form>";
    /* Auto-Update */
    $description .= "<h3>Auto-Update</h3>";
    $description .= "<form action='" . $site_url . "admin/index.php?view=addons' method='post' accept-charset='UTF-8'>\n\tIf you want to retrieve automatically the comments of all your photos (once a day at 00:00:00 UTC).<br />\n\tEnable this option will first retrieve the comments of all your photos | Execution Time : 2 images per second.\n\t<br /><br />\n\t<input type='radio' name='state' id='state1' value='1' " . ($flickr_state ? 'checked="checked" ' : '') . "/>\n\t<label for='state1'>Enabled</label>\t\n\t<input type='radio' name='state' id='state2' value='0' " . (!$flickr_state ? 'checked="checked" ' : '') . "/>\n\t<label for='state2'>Disabled</label>\n\t<input type='submit' value='save !' name='flickr_settings_update' >" . ($flickr_state ? '&nbsp;&nbsp;&nbsp;<strong>Last update: ' . $flickr_last_update . '</strong>' : '') . "\n\t</form>";
    /* Reset */
    $description .= "<h3>Reset</h3>";
    $description .= "<form action='" . $site_url . "admin/index.php?view=addons' method='post' accept-charset='UTF-8'>\n\tIf you want to remove all the comments that have been retrieved from Flickr (your other comments will not be removed).\n\t<br /><br />\n\t<input type='submit' value='reset !' name='flickr_comments_remove'>\n\t</form>";
    /* About */
    $addon_description = "Retrieve your image comments from Flickr. In order for it to work, please insert the Flickr ID into the photo's tags (ex : 4518790540).<p>" . $description . "<p>Created by Aymeric Brisse (<a href='http://www.agregats.net/' target='_blank'>agregats.net</a>) - (<a href='http://www.pixelpost.org/extend/addons/flickr-comments-grabber/' target='_blank'>Plugin Page</a>) (<a href='http://www.pixelpost.org/forum/showthread.php?t=11883' target='_blank'>Forum</a>) </p>";
} elseif (isset($_GET['action']) && $_GET['action'] == 'flickr_comments_update') {
    /* Retrieve comments - via AutoUpdate */
    require_once "phpFlickr/phpFlickr.php";
    $f = new phpFlickr($api_key);
    $flickr_content .= $f->grabComments("all");
    /* Log */
    die($flickr_content);
}