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