From owner-freebsd-questions@FreeBSD.ORG Thu Feb 12 12:06:53 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DD2D1065B1B for ; Thu, 12 Feb 2009 12:06:53 +0000 (UTC) (envelope-from lars@larseighner.com) Received: from mail.team1internet.com (mail.team1internet.com [216.110.13.10]) by mx1.freebsd.org (Postfix) with ESMTP id 5BD788FC28 for ; Thu, 12 Feb 2009 12:06:53 +0000 (UTC) (envelope-from lars@larseighner.com) Received: by mail.team1internet.com (Postfix, from userid 12346) id BA55316D754; Thu, 12 Feb 2009 06:06:52 -0600 (CST) Received: from larseighner.com (unknown [216.110.13.88]) by mail.team1internet.com (Postfix) with SMTP id 5D76B16D5AF; Thu, 12 Feb 2009 06:06:51 -0600 (CST) Received: by larseighner.com (nbSMTP-1.00) for uid 1001 lars@larseighner.com; Thu, 12 Feb 2009 06:05:40 -0600 (CST) Date: Thu, 12 Feb 2009 06:05:39 -0600 (CST) From: Lars Eighner X-X-Sender: lars@debranded.6dollardialup.com To: Fbsd1 In-Reply-To: <4994089B.9030708@a1poweruser.com> Message-ID: <20090212055246.D78478@qroenaqrq.6qbyyneqvnyhc.pbz> References: <4994089B.9030708@a1poweruser.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Sanitizer: Anomy and SpamAssassin mail filter - see http://www.6dollardialup.com/support/spaminfo.html Cc: FreeBSD Questions Subject: Re: Apache/php X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 12:07:08 -0000 On Thu, 12 Feb 2009, Fbsd1 wrote: > I have php code on home page to count how many times it is accessed from > the internet. Problem is pages deeper in website can jump back direct to > home page and this again gets counted. This is one of many ways that counters can be wildly inaccurate and is among the reasons that mature web sites don't use counters (or at least don't display them). > Is there any way to give the php counter routine intelligent so it will > bypass bumping the counter on accesses coming from pages in the site? Sure. You can just not bump the counter when HTTP_REFERER is a page at your site. There are increasingly more complex ways to eliminate *some* other sources of inaccuracy, but you get nearer to redesigning the site to suit the counter, which is silly in most cases. Analysis of server logs is the real way to go about serious statistics, although there still are sources of inaccuracies which cannot be reduced. -- Lars Eighner http://www.larseighner.com/index.html 8800 N IH35 APT 1191 AUSTIN TX 78753-5266