Jun 19, 2008
Feedburner Count As Plain Text
Code Snippets | PHP | Tutorials & Resources | WordPress
Make a call to the Feedburner API requesting the feedcount for a given burned feed.
Place the following code in your template before where you want to display the count. This will get your feedcount from feedburner. Replace leungeric with the name of your feedburner feed.
<?php $url="http://api.feedburner.com/awareness/1.0/GetFeedData?uri=leungeric"; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec($ch); curl_close($ch); $xml = new SimpleXMLElement($data); $fb = $xml->feed->entry['circulation']; ?>
Now we’ve got your feedcount in a variable called $fb. Wherever you want to output your feedcount simply drop in the following code:
<?php echo $fb;?>


















No Comments, Comment or Ping
Reply to “Feedburner Count As Plain Text”