Cats Who Blog write nice code, the function of this code is How to display your average feed and readers. I’ll re share this code for you and we hope you like it.
Before we started to code, we need to prepare text editor such as Coda, TextMate, Text Edit, Notepad++ or whatever you like. Then open your functions.php in your themes files and write down.
function get_average_readers($feed_id,$interval = 7){
$today = date('Y-m-d', strtotime("now"));
$ago = date('Y-m-d', strtotime("-".$interval." days"));
$feed_url="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=".$feed_id."&dates=".$ago.",".$today;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $feed_url);
$data = curl_exec($ch);
curl_close($ch);
$xml = new SimpleXMLElement($data);
$fb = $xml->feed->entry['circulation'];
$nb = 0;
foreach($xml->feed->children() as $circ){
$nb += $circ['circulation'];
}
return round($nb/$interval);
}
After your finished re write this code, you need to call parameter with this code, Pass your Feedburner feed id as a parameter:
<?php
$nb = get_average_readers('WPTricks');
echo "We currently have ".$nb." RSS readers";
?>
Thanks for WP Recipes to share it, now we can display more better RSS Readers stats
Photos via Egotastic




I think now it is easy for me to displaying average rss readers # word press.Thanks for the tips.