ExtremeSEO
BANNED
- Nov 11, 2009
- 357
- 398
Google Trends Scrapper using Atom Feeds
Requirements:
PHP 5.1.0 and Libxml 2.6.0+
PHP:
function get_trends() {
$url='http://www.google.com/trends/hottrends/atom/hourly';
$feed = @simplexml_load_file($url,'SimpleXMLElement', LIBXML_NOCDATA);
$html= $feed->entry->content;
preg_match_all('#([^<]+)#',$html[0],$match);
return $match[2];
}
Requirements:
PHP 5.1.0 and Libxml 2.6.0+