Readers: 0 | Updated: 2008

Tips:利用Technorati API在你的Blog显示排名

Translate Into:

Yoast的Blog上介绍了一个利用Technorati API直接在Blog上显示排名的方法,原文为Using the Technorati API on your blog,此方法与之前介绍过的用字符方式显示Feedburner订阅数的方法类似,同样利用一段代码就可搞定。

个人感觉非常不错,所以马上试验了一下,现已能成功输出相应信息,具体使用方法如下。

1、首先到Technorati上获取你的API Key

2、在Blog模版中添加如下代码:
注:红字部分需改为你自已的值。

<?php $technorati = get_option(”technorati”);
if ($technorati['lastcheck'] < ( mktime() - 600 ) ) {
$apikey = “apikey“;
$endpoint = “http://api.technorati.com/cosmos?key=”.$apikey;
$request = $endpoint.”&url=riku.me&limit=10″;
$snoopy = new Snoopy;
$result = $snoopy->fetch($request);
if ($result) {
$pattern1 = ‘/<inboundblogs>([0-9]+)</inboundblogs>/’;
$pattern2 = ‘/<inboundlinks>([0-9]+)</inboundlinks>/’;
$pattern3 = ‘/<rank>([0-9]+)</rank>/’;
preg_match($pattern1, $snoopy->results, $matches);
preg_match($pattern2, $snoopy->results, $matches2);
preg_match($pattern3, $snoopy->results, $matches3);
$technorati['inboundblogs'] = number_format($matches[1]);
$technorati['inboundlinks'] = number_format($matches2[1]);
$technorati['rank'] = number_format($matches3[1]);
$technorati['lastcheck']= mktime();
update_option(”technorati”,$technorati);
}
}
echo “<p>本Blog最近六个月内在”.$technorati['inboundblogs'].” 个Blog上有
“.$technorati['inboundlinks'].” 个外部链接,
在所有Blog中的排名为 “.$technorati['rank'].” .</p>”; ?>

3、查看自已的Blog显示效果。

本站位于Technorati上的信息:http://technorati.com/blogs/riku.me

Tips:利用Technorati API在你的Blog显示排名 - technoratirank

Blog上的显示效果。

Tips:利用Technorati API在你的Blog显示排名 - technoratirank2

原作者文章:http://yoast.com/technorati-api-wordpress/

Technorati : , ,

Tips:利用Technorati API在你的Blog显示排名 - light 发表留言 原文链接 Feed订阅 F.ollow.me 乐涵 web statistics Tips:利用Technorati API在你的Blog显示排名 - ystat
Tips:利用Technorati API在你的Blog显示排名 - backlinks468x60

From The Blogs

Internet Observation

2008
未来属于网络服务
记得电影《The Graduate》里,本刚毕业,父亲的朋友建议他从事塑胶行业,一个很有前途的行业。这个片段在那时像场必赢的赌博,然而它也的确就是。      今天网络行业可能就是片中正在发展的塑胶行... 查看全文

OnStartups

2008
Embarassingly Gushing Praise for TechCrunch And The New CrunchBase API
For those that are nauseated or otherwise troubled by gushing praise of techblogs, please click away now. I will not be offended. I'm an avid reader of the TechCrunchblog. In their own words, it's a b... 查看全文

Internet Observation

2007
technorati博客给出一个'权威'排名
Ben留意到technorati已经开始给博客一个“局级”,排名前100位的名单是根据收入来排的,但现在是以“权威”(虽然在该名单至今,我不见有多大改变)虽然目前为止,还没看到他们博客上对这个“权威”... 查看全文

E-space

2008
xibben:digg型分类网址排名
xibben是一个德国的digg型网址书签排名网站。其采用了详细的分类,时间过滤和搜索支持,注册用户可以推荐和收藏不同网址,为其添加描述,设置分类,同时还可以对其评论和进行digg操作。另外每个网址还... 查看全文

Culture, Geography, Science, Tourism

2008
关于可再生能源排名的看法
这个月 Via Worldchanging提出了《计量基础上对关于能源方面问题的主要草案进行的科学评估》: 雅各布森是这样将可再生能源排名的, 按优劣自上而下: 1. 风能 2. 聚热式太阳能发电能源... 查看全文

Internet Observation

2007
Google Developer Day
Google is going to celebrate the event of Developer Day on May 31st, 2007 in ten countries including America, China, Japan, Britain, France, and Germany, etc. The proceedings will begin in Sydney, and... 查看全文

ProgrammableWeb

2008
An API for World Time
There are many sources out there for getting global time and timezone information online. Now theres an service getting local time anywhere in the world from the small startup WorldTimeEngine, a servi... 查看全文

Internet Observation

2008
带来广告收入的网站内容排名(前10)--2008/02
注意:Nielsen Online的AdRelevance服务使用其专有的方法,分析在线广告开支。分析只考虑了图像技术和每千人成本卖出的广告。以上的数据不反映房地产广告设计活动,发行商和广告客户间战略... 查看全文

jkOnTheRun

2008
Google Contacts API released: contacts about to become more useful
If you're connecting to Microsoft Exchange now (or in June with your iPhone), you won't be affected by this next bit o' news. The rest of us however, could us a little more data portability from all o... 查看全文

Download Squad

2008
Google releases Contact API
Filed under: Developer, Internet, GoogleShortly after releasing a tool for synchronizing Google Calendar with Outlook yesterday, Google released another key in the synchronization puzzle: an API for a... 查看全文
More Articles