feed_id($url) ; $top_posts = $aide_rss -> top_posts($feed_id,$period,$num) ; $aide_top_posts_data = ''; if(!function_exists('curl_init')){ $aide_top_posts_data .= ''; } } else { $post_links = array(); foreach($top_posts as $top_post){ $post_link = urldecode(str_replace('http://api.aiderss.com/log?url=', '',$top_post['link'])); $post_links[]=$post_link; } $post_stats = $aide_rss -> entry_stats($post_links, $feed_id); $aide_top_posts_data .= ' '; foreach($top_posts as $top_post){ $post_link = urldecode(str_replace('http://api.aiderss.com/log?url=', '',$top_post['link'])); $a_post_stats = $post_stats[$post_link]; $aide_top_posts_data .= ' '; } $aide_top_posts_data .= '
PostRank Date Title Top conversations
'.$top_post['postrank']. ' '.date('M d, Y',$top_post['pubdate']).' '.$top_post['title'].' '.$a_post_stats['slash_comments'].' '.$a_post_stats['delicious'].' '.$a_post_stats['digs'].' '.$a_post_stats['google'].'
'; } $aide_expire = 60 * 60 * 24; // Cache data for one day (86400 seconds) wp_cache_set('aide'.$period.$num,$aide_top_posts_data, 'aide_rss', $aide_expire); echo $aide_top_posts_data; }else{ echo $aide_top_posts; } } ?>