Check Your Internet Speed

Display Feedburner Subscriber Count In Text

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.   
  4. //Initialize the Curl session  
  5. $ch = curl_init();  
  6.   
  7. //Set curl to return the data instead of printing it to the browser.  
  8. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
  9.   
  10. //Set the URL  
  11. curl_setopt($ch, CURLOPT_URL, $whaturl);  
  12.   
  13. //Execute the fetch  
  14. $data = curl_exec($ch);  
  15.   
  16. //Close the connection  
  17. curl_close($ch);  
  18. $xml = new SimpleXMLElement($data);  
  19. $fb = $xml->feed->entry['circulation'];  
  20. //end get cool feedburner count  

Step 2

Paste this anywhere you want and it’ll display a Feedburner subscriber count in text.
To style it nicely with your website or blog’s theme, add <p> or <div> and tweak the CSS accordingly.
via 45n5
Source:hongkiat.com

0 comments:

Post a Comment

Websites Resources | Blogging | Technology News | Softwares - i Developments