
Are you using feedburner? Probably yes, just as a lot of bloggers do. If you don’t like the chicklet dedicated to display your feedburner count, just read this recipe which is a new method to get your feedburner count in text mode.

Are you using feedburner? Probably yes, just as a lot of bloggers do. If you don’t like the chicklet dedicated to display your feedburner count, just read this recipe which is a new method to get your feedburner count in text mode.
To display your feedburner count in full text on your WordPress blog, simply paste the following on any of your theme file, for exemple sidebar.php:
<?php $fburl=”https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=YourURL“; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $fburl); $stored = curl_exec($ch); curl_close($ch); $grid = new SimpleXMLElement($stored); $rsscount = $grid->feed->entry['circulation']; echo $rsscount; ?>
22 Responses
No caching? No protection from stupid-feedburner-displaying-zero?
@Rarst: If you have a recipe for that, just tell me and I’ll publish it
@Jean-Baptiste Jung
Joost de Valk has published such snippet (with caching and fix for zeroes) for old Feedburner api
http://yoast.com/feedburner-subscriber-count/
I don’t think it works with Google, had not tried yet (still on old server). Method is also quite different from your snippet.
Woo good for some theme integration huh!
Very nice, would like to try think little recipe out..
@Rarst would be cool if we could get a cached version on Google API server..
Nice one. I’ve known about this for a while. Now, this might’ve just been me (this was about a month ago) but if I used this code offline on my local server, it wouldn’t work. Just a heads up for all. (It worked online, though).
For Wordpress 2.7 :
Trackbacks :
li.pingback, li.trackback {
background-color:#C2A4B5;
}
VIP :
li.comment-author-VIP {
background-color:#008ADA;
}
USER :
li.byuser {
background-color:#008ADA;
}
Author :
li.bypostauthor {
background-color:#DA0000;
}
=)
here you forgot to tell that, to activate awareness api in our feedburner account, then only it will ping.. here is the reference url .http://code.google.com/apis/feedburner/awareness_api.html
working like a charm !! Thanks
It works, thanks.
I may have to try that on my blog. Thanks!
Trackbacks: