As a WordPress Theme developer, I usually deal with people that are big about RSS Feeds on their blogs.  Usually the regular old Feedburner chicklet count just doesn't fit the design of the theme.  Formatted text would fit much nicer in these situations.  I found this tutorial online a few weeks back, and it has been great.  Hope it helps you as well.

<?php
//get cool feedburner count
$whaturl="http://api.feedburner.com/awareness/1.0/GetFeedData?uri=rss4real";
//Change the above url to the address to your own Feedburner account

//Initialize the Curl session
$ch = curl_init();

//Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//Set the URL
curl_setopt($ch, CURLOPT_URL, $whaturl);
//Execute the fetch
$data = curl_exec($ch);
//Close the connection
curl_close($ch);

$xml = new SimpleXMLElement($data);
$fb = $xml->feed->entry['circulation'];

//end get cool feedburner count
?>

Put the above code anywhere in the html of your design.  It doesn't matter where.  The following snippet of php code is important.  The rss count text will display wherever you place this line of code.

<?php echo $fb;?>

That's all.  Simple, no?  It's only a bunch of copy n' paste for you guys, no work.  Well, maybe I'm lieing a bit.  You do have to change the url in the first batch of code to the url of your feedburner account.  other than that, it's simple as 1, 2, 3.

If you liked this post, stay updated. Follow me on Twitter or subscribe to our RSS Feed via email.

Post Tags: , ,

Related Posts

Like this post? Spread it!