Feb
24th

Using Technorati’s API and PHP

Thanks for stopping by my personal blog on Marketing Technology! Over 50,000 visitors a month find my content worth returning for, so don't forget to subscribe to the Marketing Technology Blog RSS feed or to the Marketing Technology Email to have new content sent directly to your inbox. You may also find my other business blog helpful, Social Media Domination.

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.

RSS feed | Trackback URI

16 Comments »

Comment by no imageSteven Hodson (SezWho)
2007-02-24 02:06:05

does this mean I get to be the first to say thanks :) and let you know that I most definitely borrowed this :)
Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-02-24 08:53:19

Borrow away, Steven! That’s what this blog is all about.
Rate this:
2.9
 
Comment by no imageDouglas Karr (SezWho)
2007-02-24 13:25:56

Steve,

I made a modification that utilizes the little Technorati logo. It’s styled quite nicely now. I’ve updated the code page as well.

Regards,
Doug

Rate this:
2.9
 
 
Comment by no imageSteven Hodson (SezWho)
2007-02-24 13:29:49

nice touch :)

I have it displaying in my Site Rankings text widget - with due credit of course :)

Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-02-24 13:38:25

Wow, that’s a HUGE credit! Thanks, so much. Don’t feel compelled to keep that there. I have a little comment in the HTML that points to the project page.
Rate this:
2.9
 
 
Comment by no imageSteven Hodson (SezWho)
2007-02-24 14:45:44

I fixed the text size LOL so it looks a little better.
Rate this:
2.9
 
Comment by no imageDouglas Karr (SezWho)
2007-02-24 18:43:15

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!
Rate this:
2.9
 
Comment by no imageDouglas Karr (SezWho)
2007-02-24 22:22:00

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’.

Rate this:
2.9
Comment by no imageSteven Hodson (SezWho)
2007-02-24 22:28:24

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
Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-02-24 22:43:08

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!

Rate this:
2.9
 
 
 
Comment by no imageDouglas Karr (SezWho)
2007-02-26 00:44:27

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!

Rate this:
2.9
 
Comment by no imageengtech (SezWho)
2007-02-27 11:44:32

I wonder how the Dapper guys are doing it? Maybe they only check once a day and cache the results.

Dapper Screen Scraping for any Site

Rate this:
2.9
 
Comment by no imageDouglas Karr (SezWho)
2007-03-03 18:43:13

Alright folks! I’ve totally rewritten this into a WordPress plugin and it has caching. Woohooo!

Technorati Rank WordPress Plugin

Rate this:
2.9
 
Comment by no imageTyler Ingram (SezWho)
2007-03-10 14:56:28

I found your little addon for Technorati, though I found out my server didn’t have cURL compiled when the PHP5 was installed.

So I’ll see if I can get this one working: http://samanathon.com/2007/03/10/wordpress-plugin-display-your-technorati-rank-with-php-4/ which you helped with for those who don’t use PHP5 :)

Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-03-10 17:21:52

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.
Rate this:
2.9
 
 
Comment by no imageLee Doyle (SezWho)
2008-09-10 03:44:10

Thanks alot! This has helped me out loads.

Now I just need to tweak it and it should be perfect

Rate this:
3.2
 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

My Comment Policy: I moderate comments. Please be patient:

  • Spam will happily be destroyed.
  • Use your real name, not some keywords. Otherwise it will be destroyed.
  • Mean comments aren't necessary. If I don't post them I will reply personally to let you know why.
  • Lewd comments will be edited, I don't want my readers leaving because of offensive content.
Great debate, criticism and colorful commentary is always appreciated and approved!