Display RSS readers of your wordpress blog in your site

Sponsors

Many wordpress blogger want to show the information RSS  readers of there site. you can show the current RSS readers count on your wordpress blog using following code.

Showing the RSS feed information to your user is good for seo and smo.

Just following code in your functions.php file.


function get_rss_readers($feed_id,$interval = 7){
$today_date = 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_date;
$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'];

$rss_readers = 0;
foreach($xml->feed->children() as $circ){
$rss_readers += $circ['circulation'];
}

return round($rss_readers/$interval);
}

In sidebar.php or where you want to show your rss feed reader count there you should use the following code.

$rss_readers = get_rss_readers('wordpressapi');
echo "We currently have ".$rss_readers." RSS readers";

You may like following Articles!

13 thoughts on “Display RSS readers of your wordpress blog in your site

  1. It is astonishing to think of what precisely web hosting looked like years ago. Plans were more expensive, a person received very little space not to mention data transfer useage and service was often simply U . s . company hours. These days you can be buying unlimited allocations for just a couple dollars a month with 24/7 service.

  2. Man I love this post and it is so informational and I am gonna save it. One thing to say the Superb analysis you have done is greatly remarkable.No one goes that extra mile these days? Bravo :) Just one more tip you canget a Translator Application for your Worldwide Readers !!

  3. I’ll right away grasp your rss feed as I can’t find your email subscription link or e-newsletter service. Do you’ve any? Kindly allow me recognize in order that I may subscribe. Thanks.

  4. I would like to thank you for the efforts you have made in publishing this article. I am hoping the same best work from you in the future as well. In fact your fanciful writing abilities has urged me to start my own blog now. Actually the blogging is spreading its wings rapidly. Your write up is a fine example of it.

  5. Great article and straight to the point. I don’t know if this is really the best place to ask but do you folks have any thoughts on where to employ some professional writers? Thank you :)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>