Actual Google and Twitter trends in a fancy newsticker for your page

Some days ago I posted an article about fetching the actual hot trends from Google. Today, I wrote the TrendFetcher library, a simple PHP class/library, that gives you a nice jquery flavoured “trend ticker” with the latest hot trends from Google, the actual trends from Twitter and some API access.

All you need is to implement jQuery, the jQuery newsticker and its styles into your page. You can easily achieve that, when you add the following lines of code in your header section:

<script type=”text/javascript” src=”http://code.jquery.com/jquery-1.4.2.min.js”></script>
<script type=”text/javascript” src=”http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/jquery.li-scroller.1.0.js”></script>
<link rel=”Stylesheet” type=”text/css” href=”http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/li-scroller.css” />

After you’ve done that, you can implement the newsticker at any place in your body section:

<?php echo file_get_contents(‘http://webciv.net/tamtam/lab/api/api.php?c=TrendTicker’); ?>

In this example, we print out what the API returns. Until now there’s only one command supported by the API, but there’ll be maybe more in the future. Also the results only include the hottrends for the region USA from Google, because other locations are not yet supported as far as I know.

To answer the question “why?”: It’s been created during some SEO research, but I found out that the idea is a nice gimmick, but worthless for SEO purposes…

See a demonstation: http://webciv.net/tamtam/lab/outpost/

Have fun!

Thumbnail photo taken from: http://www.flickr.com/photos/29487767@N02/4053393372/

Similar Posts: