随笔 - 205  文章 - 0  评论 - 508 

  AWIS(Alexa Web Information Service)是Amazon提供的一种web服务.简介如下:

The Alexa Web Information Service makes Alexa’s vast repository of information about the traffic and structure of the web available to developers.

Service Highlights

  • Gather information about web sites, including traffic data, contact information, related links and more.
  • Access historical traffic data for web sites to analyze growth and understand the effects of specific events on web site traffic
  • Build a web directory into your web site or service using an Alexa enhanced DMOZ-based browse service
  • Access the list of sites linking to any given site

  这是要说的是使用asp调用此服务时会遇到的问题.也许是出于ASP过于陈旧的原因,网站并没有提供ASP调用此服务的示例代码.在生成用于验证身份的签名信息时遇到了些问题:

  • ASP中取UTC时间的问题
  • ASP中调用 HMAC-SHA1算法的问题

  第一个不知道用VBS如何实现,第二个则实现起来难度比较大.幸运的是在网上找到一个JS版本的相同的函数,又知道了JS提供了UTC相关的函数.索性UTC函数也用JS实现,然后在VBS中调用.下面是调用的代码

Code

 下面再给出HMAC-SHA1算法的JS实现代码:

Code

 点击这儿下载JS源文件.希望能大家有所帮助.

  

posted on 2008-11-23 22:05 小猪凯 阅读(183) 评论(0) 编辑 收藏