Post Pic

How to: Display your feedburner count in full text

Are you using feedburner? Probably yes, just as a lot of bloggers do. If you don’t like the chicklet dedicated to display your feedburner count, just read this recipe which is a new method to get your feedburner count in text mode.

To display your feedburner count in full text on your WordPress blog, simply paste the following on any of your theme file, for exemple sidebar.php:

<?php
$fburl=”https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=YourURL“;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $fburl);
$stored = curl_exec($ch);
curl_close($ch);
$grid = new SimpleXMLElement($stored);
$rsscount = $grid->feed->entry['circulation'];
echo $rsscount;
?>

2 Responses

Aug 24 2011 00:27

About time someone gets to the point. Your code works. For people who are having trouble, you need to fix the following line:

$fburl=”https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=YourURL“;

The quotations in this line need to be

$fburl=”https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=YourURL”;

Once you fix the quotes, everything works great. :)

Thanks so much for your blog post. So many people made this so much more difficult than it was to accomplish. Thank you again :)

Sep 12 2011 19:51

Thanks for sharing the trick. I was searching for a long time. It’s very easy to try..

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required

WP Theme of the week

Sponsored Likebox