Ajax-Alexa-Thumbnails: API to get site thumbnails
Date : 2008 07 29 Category : Tech & DevelopmentHave you ever wanted to be able to easily grab a thumbnail image that represents a website?
Eric Ferraiuolo has created Ajax-Alexa-Thumbnails on Google Code, a library that builds on YUI to do just that.
The project consists of a server-side component written in PHP which makes the cross-domain request to Amazon's Alexa Site Thumbnail web service, and a JavaScript component which makes Ajax requests to configured server-side component and caches the results.
How do you call it?
PLAIN TEXT JAVASCRIPT: (function(){ YAHOO.util.Event.onDOMReady(function(){ var container = YAHOO.util.Dom.get("container"); YAHOO.EDF.Thumbnail.init({ source: "alexa_service.php", size: "large", anchor: true }); YAHOO.EDF.Thumbnail.getThumbnail("http://code.google.com/p/ajax-alexa-thumbnails/", function(thumbnail){ container.appendChild(thumbnail); }).getThumbnail("http://developer.yahoo.com/yui/", function(thumbnail){ container.appendChild(thumbnail); }); }); }());Since this uses Alexa, it can't give you a snapshot of any page out there.
