15525 shaares
Here is a new improved code for Google Trends Scrapper using Atom feeds:
PHP Code:
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('#<Ahref\="([^"]*)">([^<]+)#',$html[0],$match);
return $match[2];
}
p/s: you need PHP 5.1.0 and Libxml 2.6.0 or higher...
<DT>
<A HREF="http://www.geoclip.net/fr/p241_atlasfrance.php" ADD_DATE="1271368639" PRIVATE="0" TAGS="carto,statistics,freelance">Cartographie interactive - webmapping - statistiques - carte de France - atlas - Géoclip</A><DD>Permet de faire des recherche et études statistiques sur une carte de France jusqu'au niveau des communes.