Use your left/right keys to browse tutorials
Display your Feedburner stats

Display your Feedburner stats

1 Star2 Stars3 Stars4 Stars5 Stars
Posted on March 20, 2009

I’ve been away for the last week. My wife and I bought a flat in North London and finally moved in on March 16th. So I’m currently without the internet and won’t have it until the end of March which is frustrating when I want to update my blog but simply can’t so please excuse my infrequent posts over the next few weeks.

Here’s a quick piece of code to simply display your feedburner stats on your blog. I’m yet to post my stats publicly on my blog but have seen numerous blogs with the standard feedburner badge which I think is quite ugly. So here’s how to just get the stats using PHP and CURL. You can then style it how you like.

$ch = curl_init();
//set the feed url and options plus a timeout value
$result = curl_exec($ch);
// get just the subscriber number using the regex function
$subscribers = get_match('/circulation="(.*)"/isU',$result);

echo ' has <strong>'.$subscribers.'</strong> subscribers';

//close connection

function get_match($regex,$result)
	return $matches[1];


More tutorials from Papermashup
  • Rosell

    I think that the work you do here Ashley its GREAT! I love and please keep doing what are doing.

    • Ashley

      Hi Rosell,

      Really appreciate the comments and thanks for the support :)


  • Scott

    I tried it as well with my own uri, but it didn’t work with my own. It worked with yours though.

  • Ben

    It doesn’t work :|

    • Ashley

      @ben do you get an error message? The demo code is exactly the same as the code above. You need to make sure that you just add your ‘URI’ which is the highlighted section: url

      So in the PHP code you need to just change the highlighted code below. Don’t simply paste your feedburner URL as it wont work.