Mobile and Tablet Marketing, Technology

Using Technorati’s API and PHP

UPDATE: March 3, 2007 – Released Technorati Rank WordPress Plugin.

UPDATE: Well it winds up that Technorati has a daily query limit. I found out the hard way, they shut me off. If you’ve installed the widget, you’ll see that it states Error with a link back to the Project Page so that you can download and host the code yourself. I’ve also updated the code so that once you reach the Daily allotment of API calls, it will simply change into an “Add to Favorites” link.

Being a database marketer by trade, I have two flaws (okay … many more than two, but these have to do with this post). I work well with numeric goals and I work well organizing and logically aligning projects, people, software, etc. Even my books are organized (left side of the book case is software and development, right-side top is business, bottom-right is fiction).

The numeric flaw keeps me looking at Technorati, Google Analytics, and Google Adsense all day, everyday. Techorati is one of those ones that really gets my interest because it provides me with who’s linking to me. I love to visit those sites and see what they are saying or what they found useful. In order to recognize whether or not my rank changed, though, I need to do a search on my blog.

I needed something quicker so I programmed a little ‘widget’ to Technorati’s API to obtain my rank quickly and easily. It’s actually what’s displaying the rank at the top of this post. If you’d like to see how, hit my project page up.

I built it using PHP5+ (It uses SimpleXML), cURL, and JavaScript. SimpleXML is an incredibly powerful XML engine! It’s much easier to program with than the old parsing engine. Code Samples are on the project page as well.

19 Comments

  1. 1
  2. 4
  3. 6
  4. 7

    I updated the widget with a nice tooltip that provides additional details about your rank! Your Blog’s name (according to Technorati) as well as inbound links and blogs!

  5. 8

    Well, that was quick! I am currently getting an error from Technorati:
    You have used up your daily allotment of Technorati API queries.

    With that in mind, I’ve modified my posts here to have people host the code on their own rather than hitting my site. Sorry about that folks! I didn’t even know there was a ‘daily allotment’.

    • 9

      well that really suck Doug 🙂 … oh well it was fun while it lasted. Although it soes go to show some definite popularity – maybe Technorati will have noticed and implement something similar themselves

      • 10

        I hope so, too. I read through their site and can not find what the ‘daily allotment’ is, though. It’s a little frustrating.

        I have modified the code to simply pass the error message as commented HTML so it doesn’t display the “0” that it used to. Now it will only display the widget if there’s a positive response.

        I suppose the best bet may be to host the source page yourself you can do that. I’ll keep you posted when I find out what the ‘daily allotment is’. Thanks, Steven!

  6. 11

    Ok… some more improvements. If you try to look up a URL with the widget other than mine, it will tell you there’s an error and bring you to the project page. This is so that you can download the code and host it yourself. Anyone can host this code and that way you won’t run into the API daily allotment.

    I’ve also modified it so that if you do reach the Daily Allotment, it simply switches into an “Add to Favorites” link!

  7. 12
  8. 13
  9. 14
    • 15

      Wow, Tyler! I knew cURL was a requirement but I did not realize that some folks wouldn’t have it available to them. I thought that was a library that was loaded by default with PHP installs. I’m only guessing – but I bet that Samanthon’s uses cURL as well.

  10. 16
  11. 17
  12. 18

Leave a Reply