I got phpwebstats working on my local copy of the fink site.
Does anyone mind if i check this in? Can easily turn it back if it goes
badly. :) With this (and a copy of phpwebstats in fink home) we can
actually see detailed stats for the fink site that look like
http://phpwebstats.sourceforge.net/demo/
this is a good app for us since it uses php and mysql already, and you
do not need access to the httpd access.log. The only negatives might be:
- How much db space are we allowed to use? Not sure how much this will
take.
- Loading pages might be slightly slower since it has to run the
logging scripts.
Index: header.inc
===================================================================
RCS file: /cvsroot/fink/web/header.inc,v
retrieving revision 1.47
diff -u -r1.47 header.inc
--- header.inc 25 Jun 2002 20:05:33 -0000 1.47
+++ header.inc 30 Nov 2002 02:18:47 -0000
@@ -45,6 +45,24 @@
$date = filemtime($PATH_TRANSLATED);
}
+
+// Log the access
+session_start();
+include("pws/stats.php");
+include("pws/bro.php");
+$conn = db_connect();
+// set the page id
+// we could set this variable to "Gallery" for photogallery, etc.
+$page_id = $REQUEST_URI;
+// set the visitor id
+// I'll set this variable to session id, which is the simpliest way
+// This way I won't be able to get information if the user has been on
my
+// page before - the better way is the usage of cookies.
+$visitor_id = session_id();
+// and finaly log the access to the database
+log_access($conn,$page_id,$visitor_id);
+
+
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
In addiion to this patch, the phpwebstats sql files need to be loaded
in to mysql on the sf server, but that is easy.
-Ben
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel