Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
Net::Amazon::Thumbnail(3) User Contributed Perl Documentation Net::Amazon::Thumbnail(3)

Net::Amazon::Thumbnail - Use the Amazon Alexa Site Thumbnail web service

use Net::Amazon::Thumbnail;
        my %conf = (
        key_id  => "YoursecretkeyID",
            access_key  => "Yoursecretaccesskey",
        size    => "Large",
            path    => "C:/dev/thumbs/",
        no_image    => "noimage.jpg"
        my $thumb = Net::Amazon::Thumbnail->new(\%conf);
        # Request single thumbnail
        my $images = $thumb->get_thumbnail('');
        # Request multiple thumbnails
        my @domains = ('', '');
        $images = $thumb->get_thumbnail(\@domains);
        # Request with custom name (when path is provided)
        my %domain = ('' => 'TheSourceForPerl');
        $images = $thumb->get_thumbnail(\%domain);

The Net::Amazon::Thumbnail module allows you to use the Amazon Alexa Site Thumbnail web service with relative ease.
The Alexa Site Thumbnail web service provides developers with programmatic access to thumbnail images for the home pages of web sites. It offers access to Alexa's large and growing collection of images, gathered from its comprehensive web crawl. This web service enables developers to enhance web sites, search results, web directories, blog entries, and other web real estate with Alexa thumbnails images.
In order to access the Alexa Web Information Service, you will need an Amazon Web Services Subscription ID. See
There are some limitations, so be sure to read the The Amazon Alexa Web Information Service FAQ.

The interface follows. Most of this documentation was copied from the API reference. Upon errors, an exception is thrown.

The constructor method creates a new Net::Amazon::Thumbnail object. You must pass in a hash reference containing the Amazon Web Services Access Key ID, Secret Access Key, thumbnail size (small or large), and the name of your default empty image. Optionally you can also provide a path to store the images.
        my $thumb = Net::Amazon::Thumbnail->new(\%conf);

The configuration options have just a few requirements. The following keys are required:
    key_id  => "YoursecretkeyID",
    access_key  => "Yoursecretaccesskey",
The following keys are optional
    size    => "large",
Size of the returned thumbnail (Small = 111x82 pixels, Large = 201x147 pixels). If this parameter is not specified it defaults to "Large". The first letter of this paramater is automatically uppercased.
    path    => "C:/dev/thumbs/",
The location of where you want the thumbnails stored locally. Dies upon unsuccessful directory test.
The default image you want returned for queued thumbnails. If the thumbnail is not available, this is the image returned. If the path option was given, non existant images are not stored.
    no_image    => "noimage.jpg"

The get_thumbnail method retrieves the thumbnails for the sites given, and returns an array reference containing the thumbnail(s) requested.
This method only accepts one argument, which must be a reference.
Flexible argument types:
String (single domain)
        my $images = $thumb->get_thumbnail('');
Array reference (multiple domains)
        my @domains = qw(,;
        my $images = $thumb->get_thumbnail(\@domains);
Hash reference (multiple domains with custom names)
        my %domains = (
       => 'monastery',
              => 'cpan'
        my $images = $thumb->get_thumbnail(\%domains);
If the path option was given, it will return the stored image instead of the image hosted on Amazon.

The post_thumbnail is exactly the same as get method, except that it dispatches a "POST" request instead of a "GET" request.
Although this method does work, the API says to use "GET" requests.

No bugs have been reported.
Please report any bugs or feature requests to "". <> is the RT queue for Net::Amazon::Thumbnail. Please check to see if your bug has already been reported.

Ian Tyndall ""

Copyright (c) 2007, Ian Tyndall "". All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2019-01-02 perl v5.28.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.