Technorati Grabber: Get Your Technorati Rank and Authority

By  on  

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 Authority is the number of blogs linking to a website in the last six months. The higher the number, the more Technorati Authority the blog has.

...

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.

If you're looking to find the your technorati rank and authority in an automated matter, look no further than this snippet of 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: (.*)<\/a>/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!

Recent Features

  • By
    LightFace:  Facebook Lightbox for MooTools

    One of the web components I've always loved has been Facebook's modal dialog.  This "lightbox" isn't like others:  no dark overlay, no obnoxious animating to size, and it doesn't try to do "too much."  With Facebook's dialog in mind, I've created LightFace:  a Facebook lightbox...

  • By
    CSS vs. JS Animation: Which is Faster?

    How is it possible that JavaScript-based animation has secretly always been as fast — or faster — than CSS transitions? And, how is it possible that Adobe and Google consistently release media-rich mobile sites that rival the performance of native apps? This article serves as a point-by-point...

Incredible Demos

  • By
    MooTools HTML Police: dwMarkupMarine

    We've all inherited rubbish websites from webmasters that couldn't master valid HTML. You know the horrid markup: paragraph tags with align attributes and body tags with background attributes. It's almost a sin what they do. That's where dwMarkupMarine comes in.

  • By
    CSS 3D Folding Animation

    Google Plus provides loads of inspiration for front-end developers, especially when it comes to the CSS and JavaScript wonders they create. Last year I duplicated their incredible PhotoStack effect with both MooTools and pure CSS; this time I'm going to duplicate...

Discussion

  1. sinan

    how to asp version ?

  2. @sinan: Yeah…you probably wont find that on this blog…

  3. Why scrape when they’ve got a perfectly good API?

  4. @Joost: This is meant for non-critical, quick and dirty information grabbing. For something important, one should use the API.

  5. anoop

    HI,
    I have used above php code for getting rank from technorati. But getting no result. going to a blank page. Plsese look on it and help me

    my url : http://www.mindzap.biz/apis/technorati/test.php

  6. Hi, I’m new to Technorati and have no idea what php code is, I’m barely used to HTML.

    Could you please tell me what it I need to do in order to get my Technorati ranking ?

    Thank you,

    Cindy
    cdowdle2@gmail.com

  7. Hi, I’m new here and have no idea what php code is, I’m barely used to HTML coding. Could you please explain to me how I get my Technorati rating? Could you “dumb it down” for me, I don’t understand all the technical talk.

    Thank you,
    Cindy

  8. sick site!!
    Sick site!

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!