public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: daniel <danstemporaryaccount@yahoo.ca>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] [OT] recomendations for web stats in php
Date: Mon, 8 Aug 2005 13:36:26 -0400	[thread overview]
Message-ID: <200508081336.27041.danstemporaryaccount@yahoo.ca> (raw)
In-Reply-To: <Pine.BSO.4.58.0508081234140.17873@ida.bway.net>

you might want to check out awstats (emerge awstats) it's a very in-depth 
apache log analyser that'll parse combined-formated log files to capture all 
sorts of handy information and graph it to be pretty too ;-)

barring that, you could write your own php (or whatever language you like) 
-based script to handle pixel calls.  something like this:

the page you track includes html display of a pixel.  the img call for the 
pixel looks like this:

  <img
  src="/pixel.php?name1=value&name2=value"
  width="1"
  height="1"
  alt="tracking pixel"
  />

you can use your own code (even javascript if you wanna capture neat stuff 
like client resolution and colour depth) and pass that in the query string to 
your tracking server.  your tracking code will look something like this:

  <?
    // capture query string data
    foreach ($_GET as $name => $value) {
      // do some logging of some kind
    }
    header('Content-type: image/gif');
    header('P3P: CP="NOI NID ADMa OUR IND UNI COM NAV"');
    header('Expires: Sat, 22 Apr 1978 02:19:00 GMT');
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: no-store, no-cache, must-revalidate');
    header('Cache-Control: post-check=0, pre-check=0', false);
    header('Pragma: no-cache');
    printf(
       
'%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%',
       
71,73,70,56,57,97,1,0,1,0,128,255,0,192,192,192,0,0,0,33,249,4,1,0,0,0,0,44,0,0,0,0,1,0,1,0,0,2,2,68,1,0,59
    );
  ?>

that'll output a transparent gif and make sure that it's not cached so you can 
continue to log repeated page calls.

hope that helps ;-)


-- 
keep away from people who belittle your ambitions.  small people always do 
that, but the really great make you feel that you too can become great.
  - mark twain
-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2005-08-08 17:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-06 15:34 [gentoo-user] [OT] recomendations for web stats in php Mauro Faccenda
2005-08-07 10:42 ` Oscar Carlsson
2005-08-07 11:40 ` Hans-Werner Hilse
2005-08-07 12:46   ` glumtail
2005-08-08 16:36     ` A. Khattri
2005-08-08 17:36       ` daniel [this message]
2005-08-08 16:54     ` kashani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200508081336.27041.danstemporaryaccount@yahoo.ca \
    --to=danstemporaryaccount@yahoo.ca \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox