What’s hot on Twitter right now? You can scrap twitter trending topics to answer the question. But there is something hotter – Twitscoop. So what we are waiting for? Let’s scrap Twitscoop tag cloud.
Simple Twitscoop tag cloud scraper
General idea:
- Get a homepage
- Extract tags
- Remove duplicate tags
Example
<?php $file = file_get_contents("http://www.twitscoop.com"); preg_match_all("(<em class='blue'>(.*)</em>)siU", $file, $matches); $matches = array_values(array_unique($matches[1])); for ($i = 0; $i < count($matches); $i++) { $matches[$i] = strtolower($matches[$i]); } $matches = array_values(array_unique($matches)); // Job's done! $matches stores everything you need. ?>
Widget
BTW, there is a nice looking Twitscoop widget which displays hot trends and buzzing tag cloud. You can grab the code here.
What’s hot on Twitter right now? Now you know.
You may want to subscribe to my RSS feed.


By Terry on April 25th, 2009.
Thanks for the tip. New here to the internet business as well as blogging. The direction and resources will definitely be beneficial.