Category: Feedburner

Do you want to get your feedburner count in plain text instead of their chicklet? Want that text to update dynamically so every time the feedburner count changes the text changes on your blog? Read on…

Getting your feedburner count as plain text gives you the flexibility to do whatever you want with it.

For instance my blog says “Subscribe Now: Over 648 readers can’t be wrong!” where the 648 automatically changes every time my feedburner count updates. Pretty cool. Certainly you didn’t think I was manually updating that did you? ;-p

Disclaimer: The following requires a basic understanding of where to place php code in your template and works on servers with PHP 5. Also, whenever working with files ALWAYS back them up before modifying them.

How To Get That Feedburner Count As Text Only


Make a call to the Feedburner API requesting the feedcount for a given burned feed.

Output the count. Thats it 😉

The Details

Place the following code in your template before where you want to display the count. This will get your feedcount from feedburner. Replace rss4real with the name of your feedburner feed.

//get cool feedburner count

//Initialize the Curl session
$ch = curl_init();

//Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//Set the URL
curl_setopt($ch, CURLOPT_URL, $whaturl);
//Execute the fetch
$data = curl_exec($ch);
//Close the connection

$xml = new SimpleXMLElement($data);
$fb = $xml->feed->entry[‘circulation’];

//end get cool feedburner count

Now we’ve got your feedcount in a variable called $fb. Wherever you want to output your feedcount simply drop in the following code:

<?php echo $fb;?>

The How To Get Your Feedburner Count As Plain Text Conclusion

That’s all she wrote. To see this code in action simply visit my blog at and check out the subscribe box.

If you like this post then please consider subscribing to my full RSS feed. You can also Subscribe to 45n5 by Email and have new posts sent directly to your inbox.

Update: The CTO of feedburner says this trick doesn’t report accurate results for desktop readers currently but offers a way to improve it (thanks). I also added a creative commons license to the code if you think you can improve it, go for it, just attribute the original!

Major Update 1: WP Plugin: Feedburner Feed Stats

» You can get feedburner subscriber stats without sending a single one of your visitors to feedburner.

» It doesn’t require any hacking or exploits, just simply modifying your own rss feed.

» In the following article I’ll show you exactly how it’s done and how you can start seeing the results instantly!

Why Not Use Feedburner “As Is” For Stats?

Most people have concerns that their entire rss readership is subscribed to a third party and NOT to themselves. If feedburner went out of business tomorrow you would be up a creek.

Feedburner allows your burned feed on their site get indexed and rank in the search engines, which is a major party foul.

Also my feedreader of choice, sharpreader, has a hard time with autodiscovery of feedburner feeds.

How To Get Feedburner Stats Without Using Feedburner On Your Blog

disclaimer: backup any file before modifying it

First the summary of how it’s done:

1. Sign up for feedburner and burn your feed.

2. Add code below to your rss feed replacing “yourfeedhere” with your feedburner feed name

Thats it! Your dialy subsribers will take until the next day to update, however your live hits will start showing instantly!

Step By Step of how it’s done (with video tutorial):

1. Sign up for feedburner and burn your feed. (that didn’t change)

2. Take the new feed name you just created and replace the blue text below with it:

$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $feedburnerfeed);
$data = curl_exec($ch);

Code licensing only (modify away just attribute the source):

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

3. Copy and paste the code snippet above into your rss feed file, in a php section, and upload to your server.

That’s it! Are your eyes glazed over and you still need a bit more help? I made the next video just for you!

Helpful Tip – When you save your modified file save it as a new file name. So if you rss file is called rss.php, save your new file as rss2.php. When you are sure the new file is working correctly you can change it back to the original filename.

Proof of concept

The image on the right is what feedburner says this website’s weekly visitors amount to.

However I don’t have a single subscriber here using feedburner (check my feed links on the right, none go to feedburner).

And what about that cool subscriber breakdown everybody shows off?

You can have that too 😉 Here’s mine:


Pretty dang cool, huh?


I enjoyed discovering and writing about this feedburner trick. I believe this blog post has great appeal and I want the world to know about it.

If you’ve enjoyed this post please bookmark it, digg it, and share it with your friends. If you mention this feedburner post on your blog I’ll include a link back to you below (shoot me an email so I don’t miss it).