Your Ad Here
 Powered by Max Banner Ads 

How To Display Feedburner Subscriber Count In Plain Text May 21st, 2009

text feedcount

I believe you’ve seen websites and blogs that uses the text-based Feedburner subscriber


count
instead of the chicklet. I hope you are not getting the idea the these guys update their feed

count manually. Instead, it can be done easily with scripts, and the reason why you want to do is – it gives you total flexibility in terms of design, styling and display.

Step 1

Copy paste the following code into your template, replace feedburner-id with your Feedbuner username. This script will grab you the

feed

count in numbers.

  1. //get cool feedburner 
    count
  2. $whaturl=“http://api.feedburner.com/awareness/1.0/GetFeedData?uri=feedburner-id”;
  3. //Initialize the Curl session
  4. $ch = curl_init();
  5. //Set curl to return the data instead of printing it to the browser.
  6. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  7. //Set the URL
  8. curl_setopt($ch, CURLOPT_URL, $whaturl);
  9. //Execute the fetch
  10. $data = curl_exec($ch);
  11. //Close 
    the connection
  12. curl_close($ch);
  13. $xml = new SimpleXMLElement($data);
  14. $fb = $xml->feed->entry['circulation'];
  15. //end get cool feedburner 
    count

Step 2

Paste this anywhere you want and it’ll display a Feedburner

subscriber

count in text.

  1. echo $fb;

To style it nicely with your website or blog’s theme, add or and tweak the CSS accordingly.

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

Overview

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


Blog Widget by LinkWithin

  • Print this article!
  • E-mail this story to a friend!
  • Google Bookmarks
  • Yahoo! Buzz
  • RSS
  • MySpace
  • Facebook
  • Technorati
  • Digg
  • del.icio.us
  • SphereIt
  • StumbleUpon
  • Reddit
  • Propeller
  • Live

[Post to Twitter] Tweet This  [Post to Plurk] Plurk This  [Post to Yahoo Buzz] Buzz This  [Post to Ping.fm] Ping This 

Tags: ,
Posted in English |

Leave a Reply


 Powered by Max Banner Ads 
Related Topic:

The morning after
http://pride4us.com/

Google Adwords vs Google Adsense vs What is AdWords? AdWords is Google's pay-per-click advertising system. When you
http://pride4us.com/

Weight gain tips & tricksHow to gain weight. Trying to add weight is something that's not easy
http://pride4us.com/

Top Referer

Today tweets