Technorati Grabber:获得您的Technorati排名和权限

Technorati is one of those sites that's like Alexa in that you get an assigned rank. You also get what is called "authority," which represents:

Technorati是像Alexa这样的网站之一,您可以得到指定的排名。 您还将获得所谓的“权限”,它表示:




...
...


Technorati Rank is calculated based on how far you are from the top. The blog with the hightest Technorati Authority is the #1 ranked blog. The smaller your Technorati Rank, the closer you are to the top.
Technorati排名是根据您离顶部的距离而计算的。 Technorati最高权威的博客是排名第一的博客。 您的Technorati排名越小,您就越靠近顶部。

If you're looking to find the your technorati rank and authority in an automated matter, look no further than this snippet of PHP.

如果您希望通过自动化的方法来找到您的技术规范级别和权威,那只不过是这段PHP代码段。

PHP (The PHP)



//url
$url = 'http://technorati.com/blogs/davidwalsh.name';

//get the page content
$site = get_data($url);

//parse for product name
$authority = get_match('/Authority: (.*)/isU',$site);
$rank = get_match('/Rank: (.*) /isU',$site);

//build content
$content.= 'Authority: '.$authority.'
'; $content.= 'Rank: '.$rank.'
'; //gets the match content function get_match($regex,$content) { preg_match($regex,$content,$matches); return $matches[1]; } //gets the data from a URL function get_data($url) { $ch = curl_init(); $timeout = 5; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); $data = curl_exec($ch); curl_close($ch); return $data; }

This grabber was too easy, as Technorati's source code doesn't put up much of a fight. Happy grabbing!

这个捕获器太简单了,因为Technorati的源代码并没有引起太大的争议。 开心抓!

翻译自: https://davidwalsh.name/technorati-rank-authority

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值