<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Crenk Technology &#187; rss feeds</title>
	<atom:link href="http://crenk.com/tag/rss-feeds/feed/" rel="self" type="application/rss+xml" />
	<link>http://crenk.com</link>
	<description>Web Apps, Mobile Apps and Reviews</description>
	<lastBuildDate>Thu, 09 Feb 2012 14:07:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to Fix the FeedBurner Counter Problem</title>
		<link>http://crenk.com/2010/07/25/how-to-fix-the-feedburner-counter-problem/</link>
		<comments>http://crenk.com/2010/07/25/how-to-fix-the-feedburner-counter-problem/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 00:30:40 +0000</pubDate>
		<dc:creator>Augusto Alvarez</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Freebies]]></category>
		<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[blogs]]></category>
		<category><![CDATA[feedburner]]></category>
		<category><![CDATA[Feedburner chicklet]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[rss feeds]]></category>
		<category><![CDATA[visitors]]></category>

		<guid isPermaLink="false">http://crenk.com/?p=11617</guid>
		<description><![CDATA[CatsWhoBlog presents a very interesting and effective option to display an average feed reader value using FeedBurner stats. There are three facts existing in today’s 2.0 worls about feeds: FeedBurner represents, even before Google acquired this company, the preferred service used for RSS feeds. All bloggers, web sites and companies, which base most of their [...]<p><a href="http://crenk.com/2010/07/25/how-to-fix-the-feedburner-counter-problem/">How to Fix the FeedBurner Counter Problem</a> originally appeared on: <a href="http://crenk.com">Crenk</a>
<br>
Join our Community: <a href="http://twitter.com/crenk">Twitter</a>, <a href="http://facebook.com/crenkcommunity">Facebook</a> 
</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.catswhoblog.com/">CatsWhoBlog</a> presents a very interesting and effective option to <a href="http://www.catswhoblog.com/how-to-get-a-more-relevant-feedburner-count">display an average feed reader value using FeedBurner stats.</a></p>
<p><img class="aligncenter size-full wp-image-11621" title="feedburner2" src="http://crenk.com/wp-content/uploads/2010/07/feedburner2.png" alt="" width="322" height="210" /></p>
<p>There are three facts existing in today’s 2.0 worls about feeds:</p>
<ol>
<li>FeedBurner represents, even before Google acquired this company, the preferred service used for RSS feeds.</li>
<li>All bloggers, web sites and companies, which base most of their strategy in number of visitors; know that having a nice way to show the popularity of your website is a key factor for attracting more loyal visitors, advertisements, etc.</li>
<li>FeedBurner values change tremendously every day, if you are not publishing on daily basis.</li>
</ol>
<p><img class="aligncenter size-full wp-image-11620" title="feedburner" src="http://crenk.com/wp-content/uploads/2010/07/feedburner.png" alt="" width="513" height="178" /></p>
<p>To fix this problem, we can use this code in functions.php which will use the average readers from the last 7 days, a number more accurate for our RSS feed (<a href="http://crenk.com/wp-content/uploads/2010/07/feedburner_functions.txt">download the TXT for functions.php</a>):</p>
<pre>function get_average_readers($feed_id,$interval = 7){
	$today = date('Y-m-d', strtotime("now"));
	$ago = date('Y-m-d', strtotime("-".$interval." days"));
	$feed_url="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=".$feed_id."&amp;dates=".$ago.",".$today;
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_URL, $feed_url);
	$data = curl_exec($ch);
	curl_close($ch);
	$xml = new SimpleXMLElement($data);
	$fb = $xml-&gt;feed-&gt;entry['circulation'];

	$nb = 0;
	foreach($xml-&gt;feed-&gt;children() as $circ){
		$nb += $circ['circulation'];
	}

	return round($nb/$interval);
}
</pre>
<p>Once done, you can call the function wherever you want in your theme files. Pass your Feedburner feed id as a parameter (<a href="http://crenk.com/wp-content/uploads/2010/07/feedburner_example.txt">download the TXT for this example</a>):</p>
<pre>&lt;?php
$nb = get_average_readers('catswhocode');
echo "I have ".$nb." RSS readers";
?&gt;
</pre>
<ul class="related_post">
<li><a href="http://crenk.com/2011/03/31/how-to-set-goals-for-your-blog/" title="How to Set Goals for your Blog">How to Set Goals for your Blog</a> &#8211; March 31, 2011</li>
<li><a href="http://crenk.com/2011/02/06/50-ways-to-promote-your-blog/" title="50 Ways to Promote Your Blog">50 Ways to Promote Your Blog</a> &#8211; February 6, 2011</li>
<li><a href="http://crenk.com/2009/06/09/95-percent-of-blogs-are-abandoned/" title="95 percent of Blogs are Abandoned">95 percent of Blogs are Abandoned</a> &#8211; June 9, 2009</li>
<li><a href="http://crenk.com/2011/07/16/how-to-take-your-blog-to-the-next-level/" title="How to Take Your Blog to the Next Level">How to Take Your Blog to the Next Level</a> &#8211; July 16, 2011</li>
<li><a href="http://crenk.com/2011/07/12/tiny-tiny-rss-open-source-google-reader-alternative/" title="Tiny Tiny RSS: Open Source Google Reader Alternative">Tiny Tiny RSS: Open Source Google Reader Alternative</a> &#8211; July 12, 2011</li>
</ul>
<img src="http://crenk.com/5d26c88b/266bb3d8/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" /><p><a href="http://crenk.com/2010/07/25/how-to-fix-the-feedburner-counter-problem/">How to Fix the FeedBurner Counter Problem</a> originally appeared on: <a href="http://crenk.com">Crenk</a>
<br>
Join our Community: <a href="http://twitter.com/crenk">Twitter</a>, <a href="http://facebook.com/crenkcommunity">Facebook</a> 
</p>
]]></content:encoded>
			<wfw:commentRss>http://crenk.com/2010/07/25/how-to-fix-the-feedburner-counter-problem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

