Home » Home Server » Get FeedBurner subscribers count using PHP

Get FeedBurner subscribers count using PHP

written by Anand August 17, 2012

UPDATE (01/12/2013): This will no longer work because Google has shutdown FeedBurner API.


FeedBurner is a web feed management provider from Google. It provides custom RSS feeds and management tools to bloggers, podcasters, and other web-based content publishers. Recently, I wrote posts on how to get Facebook like count using PHP and Twitter followers count. Continuing along the same lines, in this post, I will explain how to get FeedBurner subscribers count using a simple PHP script. The number can be stored in cache or a database and displayed as simple formatted text or combined with other numbers to display a total followers/subscribers count thereby saving some much need sidebar-space. It also slightly improves page load speeds. So without further delay, here it goes.
Get FeedBurner Subscribers Count

Feedburner Chicklet

PHP code to get FeedBurner Subscribers Count

The PHP script to get FeedBurner Subscribers count is pretty simple and straightforward:

$fburl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=http://feeds.feedburner.com/htpcBeginner";
$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'];

$fburl is the variable to hold the link to access your FeedBurner API. Only edit you have to do is replace htpcBeginner with your account name. You can get it from your FeedBurner page:

FeedBurner MyFeeds

FeedBurner MyFeeds

After you get FeedBurner subscribers count, you can display it as simple text using the following PHP code:

echo $rsscount.' subscribers';

This will output 26 subscribers.

You can even get counts of your Facebook likes and Twitter followers and add them all together and display a combined followers count like this:

Combined Followers Subscribers Count

Combined Followers Subscribers Count

FeedBurner Subscribers Count History

Although you may be able to get FeedBurner subscribers count history and more by other means, I like to record the data in a format I like. I currently get Facebook like count, Twitter followers count, FeedBurner subscribers count, and Alexa site rank and record them in a MySQL database daily to see the growth of my blog. If you make any changes / improvements to your blog then you have the data to see what impact it had on your subscribers / followers count. In a separate post, I will explain how to accomplish this.

Meanwhile, get FeedBurner subscribers count using the above script, get creative, and find innovative ways to use the count. Please do not forget to share your idea with us in the comments sections.

IPVanish VPN Exclusive 20% Off - only $5.19/month:
VPN Guides
Windows, Android, Ubuntu
Kodi OpenVPN
OSMC on RPi
♦ Hide your browsing (no logs), Anonymize Streaming and Downloads
♦ Circumvent Geo/Country Restrictions and access worldwide content
♦ Works on Windows, Mac, Linux, Android, iOS, Router, and more
♦ Money back guarantee - Sign Up Now
Super Hot deal for National Cybersecurity Awareness Month. 2-years premium VPN from IPVanish for $99 (only $4.12 per month)

Related Articles

2 comments

Jack April 3, 2014 - 2:08 am

Sadly the awarnes API is no longer available. So we need a solution without it.

Reply
salsan March 6, 2015 - 7:07 am

I wrote a php script for it

source code here : https://github.com/salsan/FeedCountText

Require you active FeedCount on your account of FeedBurner

Example

Mashable

http://feedcounttext.appspot.com/FeedContText.php?uri=http://feeds.feedburner.com/~fc/Mashable

Reply

Leave a Comment