How to add ads end of wordpress RSS feed

How to fetch Feedburner Subscriber Count in wordpress

We all are using the feedburner button in wordpress sites. In this article showing, How to fetch Feedburner Subscriber Count in wordpress website using our code.

How to fetch Feedburner Subscriber Count in wordpress

Just copy paste the following code in your sidebar.php file(This file you will find in your template folder.)

<?php

//You need to change the uri parameter to your website name
$whaturl=”http://api.feedburner.com/awareness/1.0/GetFeedData?uri=wordpressapi/ZoqV”;

//Initialize the Curl for using the feedburner api
$wordpressapi = curl_init();

//Set curl to return the data instead of printing it to the browser.
curl_setopt($wordpressapi, CURLOPT_RETURNTRANSFER, 1);

//Set the URL
curl_setopt($wordpressapi, CURLOPT_URL, $whaturl);

//fetching data
$data = curl_exec($wordpressapi);

//Closing connection
curl_close($wordpressapi);
$xml = new SimpleXMLElement($data);
$fbcount = $xml->feed->entry[‘circulation’];
echo $fbcount;
//end get cool feedburner count
?>

Echo $fbcount will print the feed Subscriber count.

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

One thought on “How to fetch Feedburner Subscriber Count in wordpress”

Leave a Reply

Your email address will not be published.