2 include_once('../lib/twitese.php');
3 function getTrends($format = 'json'){
4 if($format !== 'json' && $format !== 'xml'){
7 $url = 'http://search.twitter.com/trends.'.$format;
8 $response = objectifyJson(processCurl($url));
12 function outputTrends($format = 'json'){
13 $trends = getTrends($format);
14 if(!isset($trends->trends)){
18 foreach ($trends->trends as $trend) {
21 <a href="search.php?q='.rawurlencode($trend->name).'">'.$trend->name.'</a>