BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

Previous posts in WS, web services

 
 
Page 2526 of 19542

Ajax-Alexa-Thumbnails: API to get site thumbnails

Blogger : Ajaxian Blog
All posts : All posts by Ajaxian Blog
Category : WS, web services
Blogged date : 2008 Jul 29

Have 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?

JAVASCRIPT:
  1.  
  2. (function(){
  3.         YAHOO.util.Event.onDOMReady(function(){  
  4.                 var container = YAHOO.util.Dom.get("container");
  5.                
  6.                 YAHOO.EDF.Thumbnail.init({
  7.                         source: "alexa_service.php",
  8.                         size:   "large",
  9.                         anchor: true
  10.                 });
  11.                
  12.                 YAHOO.EDF.Thumbnail.getThumbnail("http://code.google.com/p/ajax-alexa-thumbnails/", function(thumbnail){
  13.                         container.appendChild(thumbnail);
  14.                 }).getThumbnail("http://developer.yahoo.com/yui/", function(thumbnail){
  15.                         container.appendChild(thumbnail);
  16.                 });          
  17.         });
  18. }());
  19.  

Since this uses Alexa, it can't give you a snapshot of any page out there.


Read comments or post a reply to : Ajax-Alexa-Thumbnails: API to get site thumbnails
Page 2526 of 19542

Newest posts
 

    Email TopXML