PHP Script – Display Your RSS Subscriber Count | Minervity
How to Create an Illustrated Cartoon Character
81,304 Views | 40 Comments

So, I decided to attempt to create a tutorial on how to create a unique illustrated cartoon character in Photoshop. It’s pretty straight forward and the skills you need for this is very limited as …

Read the full story »
Creative Corner

A series of in depth and heavily inspiring Graphic, Web and Logo Designer and Developer interviews.

Designer Apps

A resource vault of applications that would serve any Designer or Developer well to have in their arsenal.

Freelance Hub

A storage full of tips and tricks for every freelance Designer or Developer that wants to progress their business.

Geek Things

Every once in a while we’ll post a new geeky thing that might inspire you to go through the day with a laugh or a second thought.

Website Filter

A collection of websites that is sure to bring you creative inspiration and keep you on the edge of design.

Home » PHP

PHP Script – Display Your RSS Subscriber Count

Submitted by Richard Darell37,536 Views | 35 Comments

PHP ScriptsRecently 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% [?]

35 Comments »

  • Daily Links | AndySowards.com :: Professional Web Design, Development, Programming, Hacks, Downloads, Math and being a Web 2.0 Hipster? said:

    [...] Minervity » PHP Script – Display Your RSS Subscriber Count Another Alternative way to Display RSS Subscribers count with PHP! (tags: php feed script display rss) [...]

  • twernessy said:

    http://www.minervity.com – cool sitename man)))

    [Reply]

  • Twinster (author) said:

    twernessy – Thanks you vey much! It stands for “Minor Entrepreneurial Activity” Yup, there you go!

    [Reply]

  • sameer said:

    Sir,I had placed above code but it display nothing only blank page is dsplayed

    [Reply]

  • Twinster (author) said:

    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]

  • You are now listed on FAQPAL said:

    Display Your RSS Subscriber Count…

    This script will enable you to display the RSS Subscriber Count without using the FeedBurner chicklet….

  • links for 2009-02-28 | Static-Romance.Org said:

    [...] Minervity » PHP Script – Display Your RSS Subscriber Count (tags: php webdesign web design) [...]

  • Andrew said:

    Any way to do this for a .blogspot blog?

    [Reply]

  • ravindra said:

    great trick but can we do for blogspot blog

    [Reply]

  • Gaya said:

    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]

  • Display Your RSS Subscriber Count - Google API - Tutorial Collection said:

    [...] 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. [...]

  • You are now listed on FAQPAL said:

    PHP Script – Display Your RSS Subscriber Count…

    This script will enable you to display the RSS Subscriber Count without using the FeedBurner chicklet….

  • Mary Richardson said:

    very neat!

    [Reply]

  • Script PHP – Affichage de vos abonnés RSS @ Neptisblog said:

    [...] vous pouvez le voir, il ne prend pas beaucoup de modération pour qu’il puisse fonctionner. Source PHPgoole, PHP, [...]

  • prafuldass said:

    Great tutorial. Thanks for sharing

    [Reply]

  • Dragon Blogger said:

    Brilliant, thanks for sharing, I will be using this today.

    [Reply]

  • pligg.com said:

    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…

  • DVL said:

    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]

  • Jordan Walker said:

    Cool, I could use this if I had much of an RSS following.

    [Reply]

  • Mario Fischer said:

    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]

  • Andreas Eriksson said:

    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]

  • dds said:

    this is really cool..

    [Reply]

  • Video4shared.com said:

    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]

  • JS said:

    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]

  • jubo said:

    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]

  • cellulite removal said:

    Great Blog! Very informative, This is the type of information that should be shared around the web.

    [Reply]

  • chao said:
  • Unsecured Loans said:

    Great tutorial. Thanks for sharing

    [Reply]

  • replica chronoswiss watches said:

    Your post is really informative for me. I liked it very much.

    [Reply]

  • omega watches said:

    winni2078 0806Juicy Couture is a fashion rolex watches brand which was founed in 1997 form California

    [Reply]

  • replica watches said:

    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]

  • NFLjerseys said:

    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]

  • Wholesale Gadgets said:

    Discount Wholesale Electronics, Wholesale Cell Phones, Electronic Gadgets and More from the Best Dropship Wholesaler

    [Reply]

  • omega watches said:

    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]

  • cheap jerseys said:

    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!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

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

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

Anti-Spam Protection by WP-SpamFree

Spam protection by WP Captcha-Free