Re: logging bandwidth

From: Date: Mon, 13 Aug 2001 04:29:50 +0000
Subject: Re: logging bandwidth
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62369@lists.php.net to get a copy of this message
> > I am logging server activity to a MySQL database. Unfortunately, I > > have yet found a way to log the number of bytes being transferred to a > > visitor. The closest I've come to anything like that is > > apache_lookup_uri() but I'm not sure it's meant to handle such a > > thing. Does anyone know a solution to this? > > I wouldn't use PHP for this at all. Look at Apache's Piped Logs feature > that sends log entries to an external process for logging. Should be > relatively simple to pipe it to something that enters the information into > a MySQL DB. I bet something exists that does just that somewhere. > > -Rasmus I made a little C program to do this a couple of years ago. I'm not very good at C but if you want the source anyway, just email me. Incidentally, the number of bytes transferred to the client is available in the Apache logging - check the Apache manual for the format specifier under the LogFormat directive. jason

« previous php.general (#62369) next »