Treehouse: Grow your CSS skills. Land your dream job.

Last updated on:

Get FeedBurner Subscriber Count with cURL

$ch = curl_init();
$content = curl_exec($ch);
$subscribers = get_match('/circulation="(.*)"/isU',$content);

The $subscribers variable will then be your subscriber count, for echoing out (or whatever). You'll need to replace the ID at the end of the second line with your feed's ID (find it). You'll also need to have the Awareness feature of FeedBurner enabled.


  1. Permalink to comment#

    I used the above code with my id:

    but i get an error message like this:

    Fatal error: Call to undefined function get_match() in /home/boom/public_html/subscribers.php on line 14

    my id is valid, checked the xml file:

    Is it a webhosting issue maybe? My server supports PHP Version 5.2.6


    • I think that function probably needs to be defined elsewhere…

      function get_match($regex,$content)
        return $matches[1];
  2. Permalink to comment#

    $ch = curl_init();
    $content = curl_exec($ch);
    $subscribers = get_match(‘/circulation=”(*)”/isU’,$content);

  3. Nice information! It can be used with images and CSS to produce great result…

  4. Permalink to comment#

    can you give me a demo for it, how it will look? , and can it be used on wordpress?

  5. Permalink to comment#

    The avarnes API is no longer available. We need to find a way to get the amount of subscribers without the API.

Leave a Comment

Posting Code

We highly encourage you to post problematic HTML/CSS/JavaScript over on CodePen and include the link in your post. It's much easier to see, understand, and help with when you do that.

Markdown is supported, so you can write inline code like `<div>this</div>` or multiline blocks of code in in triple backtick fences like this:

  function example() {
    element.innerHTML = "<div>code</div>";