Created
June 7, 2012 04:11
-
-
Save Narga/2886512 to your computer and use it in GitHub Desktop.
Display your FeedBurner count in full text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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