PHP Script – Display Your RSS Subscriber Count
Recently Google acquired FeedBurner and incorporated it into their online dashboard where you can find services like Google AdSense, Google Analytics and much more. This in turn created a little glitch for people who displayed their RSS Subscriber Count on their blog or website. I was one of them (as you can see in the top left corner) and I was determined to get the feature back online again. Those things are addicting after all! Haha
The problem was that Google, when transferring your account, changed the FeedBurner API to their own which created a problem. I started playing around with PHP to see if I could figure out a way to get myself a workaround for this. After not too long it was clear that the change was not that big of a deal. Just some minor changes and up it went again. Working like it should.
This script will enable you to display the RSS Subscriber Count without using the FeedBurner chicklet.
Here is the work around script and you are of course free to use it on your website.
<?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'];
?>
Put this script on top of your source and change “YourURL” to the URL that’s connected to your Google FeedBurner account. For example, I would have used:
$fburl=”https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=Minervity“;
To display your RSS Subscriber Count on your page put this code wherever you want in your source:
<?php echo $rsscount; ?>
As a side note for all beginners of PHP using it on blogs. When using WordPress (I guess it is the same for all blog packages) you have to switch to HTML view to incorporate these lines of code. It’s fairly easy and as you can see it doesn’t take much moderation to get it to work.
There you go! It wasn’t much harder then that. This should now be working with the new Google FeedBurner API.
Have Fun!
Popularity: 11% [?]
[...] Minervity » PHP Script – Display Your RSS Subscriber Count Another Alternative way to Display RSS Subscribers count with PHP! (tags: php feed script display rss) [...]
http://www.minervity.com – cool sitename man)))
[Reply]
twernessy – Thanks you vey much! It stands for “Minor Entrepreneurial Activity” Yup, there you go!
[Reply]
Sir,I had placed above code but it display nothing only blank page is dsplayed
[Reply]
Sameer – Make sure you server provider supplies Curl support. This could be the reason why your counter turns up blank. Also, when did you try this? During one time (depending on where you are in the world) the FeedBurner API is updated which during the time shows blank.
[Reply]
Display Your RSS Subscriber Count…
This script will enable you to display the RSS Subscriber Count without using the FeedBurner chicklet….
[...] Minervity » PHP Script – Display Your RSS Subscriber Count (tags: php webdesign web design) [...]
Any way to do this for a .blogspot blog?
[Reply]
great trick but can we do for blogspot blog
[Reply]
Maybe you should cache the results.
Connecting to an external service can take up a lot of time and slow down the loading time massively.
Also keep in mind that the service on the other side might timeout making your website not load.
Great little trick though
[Reply]
[...] View Tutorial No Comment var addthis_pub=”izwan00″; BOOKMARK This entry was posted on Saturday, June 6th, 2009 at 7:25 am and is filed under Php Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. [...]
PHP Script – Display Your RSS Subscriber Count…
This script will enable you to display the RSS Subscriber Count without using the FeedBurner chicklet….
very neat!
[Reply]
[...] vous pouvez le voir, il ne prend pas beaucoup de modération pour qu’il puisse fonctionner. Source PHPgoole, PHP, [...]
Great tutorial. Thanks for sharing
[Reply]
Brilliant, thanks for sharing, I will be using this today.
[Reply]
PHP Script – Display Your RSS Subscriber Count | Minervity…
Recently Google acquired FeedBurner and incorporated it into their online dashboard where you can find services like Google AdSense, Google Analytics and much more. This in turn created a little glitch for people who displayed their RSS Subscriber Coun…
I use feedburner and I really need this to work. Can you please be a bit more specific on what goes where and how to embed the feed? You said “Put this script on top of your source”. Then you stated to change “YourURL” to the URL that’s connected to my Google account. Yours is listed as url=Minervity but that is neither a URL nor a Google profile name. Can you please be a bit more specific where you pulled the Minervity from as being the URL or is it your Google profile name? Mine is a first and last name, not a single word. Do you have any extensive documentation that is a bit more descriptive? Any assistance is appreciated.
[Reply]
Cool, I could use this if I had much of an RSS following.
[Reply]
Addition: Need to activate the API first
Nice, but one thing to be noticed:
In your Feedburner setup (go to Publicize/Awareness API) you have to activate the API first – otherwise you get an Access Denied error..
[Reply]
Nice article, it’s a very nice way to get rid of the ugly standard feedburner “widget”.
A while a go i wrote a post just like this, in Swedish, so if there are any Swedes here you can find a Swedish article @ http://www.baronen.org/antal-rss-lasare-via-feedburner-api/
[Reply]
this is really cool..
[Reply]
Thanks for shared.
Can’t you shared source code to make rss when i retrive from database.
Thanks so much!
Video4Shared – Free Clips, Free Videos, Pictures, Flash Game, TV online
[Reply]
This does not work at all. I put the long php code in a .php file and entered the short php code onto my html website and nothing shows up.
[Reply]
Same again, i tried on http://bestipadreviews.com/ but nothing. mind you I’m not suprised, I’m rubbish at all the tech. side of things, thanx for the info. though.
[Reply]
Great Blog! Very informative, This is the type of information that should be shared around the web.
[Reply]
baidu
[Reply]
Great tutorial. Thanks for sharing
[Reply]
Your post is really informative for me. I liked it very much.
[Reply]
winni2078 0806Juicy Couture is a fashion rolex watches brand which was founed in 1997 form California
[Reply]
Now our watches are even cheaper! We are glad to inform you that now the high replica watches that are offered to your attention by our website are available at discount prices! This gives you a great opportunity to experiment with your style, buy as many watches as you wish and have a watch for any occasion and outfit.
[Reply]
Newest style of NFL jerseys has arrived, get the details at nfljerseys-shopping.com.. Purchase cheap jersey here since football jerseys are having promotion now.
[Reply]
Discount Wholesale Electronics, Wholesale Cell Phones, Electronic Gadgets and More from the Best Dropship Wholesaler
[Reply]
I enjoy reading the report, too. It′s easy to understand that a journey like this is the biggest event in ones life.
xiaoxiao123 09 01
[Reply]
reat article, I think you covered everything there. . . I would say freelancing is quite hard
especially if you are not used to working on your own, can be quite hard to motivate yourself also. . .
we all know what it is like to stare at the monitor.
[Reply]
Leave a comment!
Friends & Partners
10 Steps
Abduzeedo
Andy Sowards
BittBox
Brian Cray
Colorburned
CrazyLeaf Design
Design Bump
DesignFalvr
Design Reviver
Design Shard
Design Your Way
Digigirl
From The Couch
Fudge Graphics
Fuel Your Creativity
GoMediaZine
Good-Tutorials
Hongkiat
I Am Khayyam
ImJustCreative
InstantShift
Just Creative Design
Krftd
Line25
Loon Design
Mashable
MyInkBlog
Naldz Graphics
Noupe
Obox Design
Outlaw Design Blog
PhotoshopGirl
Photoshop Roadmap
Printed Proof
PSD Fan
PSDTuts+
Six Revisions
Smashing Magazine
Speckyboy
Spoon Graphics
Spoonfed Design
The Design Superhero
Tutorial9
Tutorial King
Tutorial Magazine
TutZone
Vandelay Design
VectorTuts+
Webdesigner Depot
Web Design Ledger
We Are Not Freelancers
Random Posts
Latest Video Post
Recent Posts
Most Commented
Most Popular