Skip to content

Instantly share code, notes, and snippets.

@Narga
Created June 7, 2012 04:11
Show Gist options
  • Save Narga/2886512 to your computer and use it in GitHub Desktop.
Save Narga/2886512 to your computer and use it in GitHub Desktop.
Display your FeedBurner count in full text
//http://www.narga.net/display-plan-text-counter-of-feedburner-delicious-and-twitter/
<?php
//get cool FeedBurner count
$fburl="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);
$rsscount = $xml->feed->entry['circulation'];
//end get cool feedburner count
echo $rsscount;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment