(+84) 463.28.7979

How To Display Feedburner Subscriber Count In Text

text feedcount How To Display Feedburner Subscriber Count In Text

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

Leave a Reply

Your email address will not be published. Required fields are marked *