Scraping Twitscoop

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.

  • Twitter
  • del.icio.us
  • Facebook
  • MySpace
  • Google Bookmarks
  • Technorati
  • StumbleUpon
  • Digg
  • Reddit
  • Sphinn
  • Slashdot
  • NewsVine
  • Propeller
  • Tumblr
  • BlinkList
  • Faves
  • LinkedIn
  • Mixx
  • Netvibes
  • connotea
  • MisterWong

You may want to subscribe to my RSS feed.

LUCK3.com - Casino & Poker room

One comment.

  1. Thanks for the tip. New here to the internet business as well as blogging. The direction and resources will definitely be beneficial.

Post a comment.