Techol - Latest Tips, Tricks, News and Productive Hacks

Includes Latest Tips, Tricks, News and Productive Hacks that you like to know.

Categories

FriendFeed

Follow Us

Subscribe In a Reader Follow Me on Twitter Follow My SMS

Enter your email address:

 Subscribe in a reader

Donation

Followers

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.

//get cool feedburner count
$whaturl="http://api.feedburner.com/awareness/1.0/GetFeedData?uri=feedburner-id";

//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

Step 2

Paste this anywhere you want and it’ll display a Feedburner subscriber count in text.

echo $fb;

To style it nicely with your website or blog’s theme, add

or

and tweak the CSS accordingly.

.

Related Posts with Thumbnails

0 comments

Post a Comment


Can't find what You're looking for? Try Google Search.

Translation by Google

Popular Posts

Recent Posts

Earn Money By Blog Reviews

PayPerPost
ss_blog_claim=912fac891e81c0039da80c7868c8006f ss_blog_claim=912fac891e81c0039da80c7868c8006f