fotogram
07-17-2005, 06:44 AM
I extended pixelpunk's Daily Visits addon (http://www.pixelpost.org/v1/index.php?x=downloads&details=13) to report how many of the daily visitors are feeds and how many are not. I added the followin lines:
$count_non_feed = mysql_query("select count(*) as count from ".$pixelpost_db_prefix."visitors where datetime like '$datenow%' and ruri not like '%x=atom' and ruri not like '%x=rss'");
$count_non_feed = mysql_fetch_array($count_non_feed);
$today_non_feed_visits = $count_non_feed['count'];
$tpl = ereg_replace("<STATS_NON_FEED_VISITORS_TODAY>","$today_non_feed_visits",$tpl);
$count_feed = $today_visits - $today_non_feed_visits;
$tpl = ereg_replace("<STATS_FEED_VISITORS_TODAY>","$count_feed",$tpl);
$count_non_feed = mysql_query("select count(*) as count from ".$pixelpost_db_prefix."visitors where datetime like '$datenow%' and ruri not like '%x=atom' and ruri not like '%x=rss'");
$count_non_feed = mysql_fetch_array($count_non_feed);
$today_non_feed_visits = $count_non_feed['count'];
$tpl = ereg_replace("<STATS_NON_FEED_VISITORS_TODAY>","$today_non_feed_visits",$tpl);
$count_feed = $today_visits - $today_non_feed_visits;
$tpl = ereg_replace("<STATS_FEED_VISITORS_TODAY>","$count_feed",$tpl);