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.
My favorite part of the Web 2.0 revolution is the abundance of APIs. Everyone has one: Digg, Feedburner, Pownce, Flickr, Google Maps, etc. FeedBurner provides a sweet “Awareness API” that allows you to pull statistics from your FeedBurner account. Here’s how you do it using PHP cURL.
The PHP
//open connection
$ch = curl_init();
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL,'http://api.feedburner.com/awareness/1.0/GetFeedData?id=#######');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
//execute post
$content = curl_exec($ch);
$subscribers = get_match('/circulation="(.*)"/isU',$content);
echo 'Subscribers: '.$subscribers;
//close connection
curl_close($ch);
/* helper: does the regex */
function get_match($regex,$content)
{
preg_match($regex,$content,$matches);
return $matches[1];
}
It’s that easy. What makes this even better is that I hate FeedBurner’s “badge” and I can manipulate the result of the above code any way I want. Click here to learn more about FeedBurner’s Awareness API and the information you can pull about your feed.
A while back, CSS-Tricks Tsar Chris Coyier and I created a Weather Switcher script that connected to Yahoo!’s weather API, downloaded an XML file containing weather information for a specified zip code, and modified the website’s theme based on the weather.
Yahoo! recently made an update to their response script which blew up my script. I’ve updated the script and now everything is working as it should.
Click here to get the updated code.