Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, October 10, 2026

File: [Platon] / phpWebLogAnalyzer / doc / INSTALL (download)

Revision 1.1, Fri Oct 25 00:47:19 2002 UTC (23 years, 11 months ago) by nepto

Documentation files moved from project root to doc/ subdirectory.

phpWebLogAnalyzer fast install instructions
-------------------------------------------

phpWebLogAnalyzer is complex web accesses analyzer and logger. It logs
everything it can. You can see the list of logged properties at the
end of file. Of course, various configuration and manipulation with
them is offered by appropriate class methods.

See also README file for license and copyright notes. See test.php file for
some phpWebLogAnalyzer usage examples.

And now instalation instructions.

1. Unpack archive (you probably have if you read this ;-)
2. Install PEAR (pear.php.net). It is neccessary, because
   phpWebLogAnalyzer requires PEAR DB module.
3. Prepare your database. Tables are properly prefixed, so it can be
   already existing database.
4. Create database tables. They are located in sql/mysql.sql file.
5. Now is everything OK, you can use phpWebLogAnalyzer from your
   script. Follow the steps and examples below.

// Neccessary class inclusion
include("phpWebLogAnalyzer.inc.php");

// Data source name (your database)
$dsn = "mysql://test:test@localhost/test";
// Session timeout (if not specified, 30 * 60 seconds will be used)
$timeout = 30 * 60;

// Object creation
$weblog = new Web_Log($dsn, $timeout);

// Specify this if you want to truncate hostname and IP adresses.
// That means fe. foo.bar.com will be saved as *.bar.com.
$weblog->enableTruncateNames();

// Specify this if you want to use raw log format. It will log data
// into one table, but further data conversion via cron or at will be
// neccessary. We are currently working on this convertor.
$weblog->enableRawLog();

// If you want to prevent from logging of some property, you can
// specify this. Properties are currently listed at the of this file.
// If you disable some property in this way, you may (but not must!)
// delete appropriate columns/tables.
$weblog->disableProperty('session_id');

// And finally registering access. You can pass access/click specified
// value to phpWebLogAnalyzer to log it.
$weblog->registerAccess($value);

// Another stuff is here (but count with higher DB load).

// To get array of active session IDs. Results are cached so you can
// call it freely more than once in one script.
$active_sessions = getActiveSessions();

// Get number of sessions in whole database.
$count = getSessionsCount();

// Again session counting. You can pass as parameter an array to
// specify subset of data for counting. For example, we have big
// database where some servers stores its web logs.

// We want only results for example.com HTTP host.
$count = getSessionsCount(array(
        'http_host' => 'example.com'));

// We want only results for example.com domain.
$count = getSessionsCount(array(
        'http_host' => '%example.com'));

// We want numbers of Windows users on server example.com.
$count = getSessionsCount(array(
        'server_name' => 'example.com',
        'http_user_agent' => '%Windows%');

// We want numbers of peoples accessing downloading /foo.php on
// example.com.
$count = getSessionsCount(array(
        'server_name' => 'example.com',
        'script_name' => '/foo.php');

Here are list of properties you can pass to phpWebLogAnalyzer methods:

id
datetime
value
request_method
query_string
path_info
path_translated
content_type
content_length
script_name
server_name
server_port
server_software
server_protocol
gateway_interface
proxy_addr
proxy_host
remote_addr
remote_host
remote_port
auth_type
remote_user
remote_ident
document_root
http_accept
http_accept_charset
http_accept_encoding
http_accept_language
http_connection
http_host
http_referer
http_user_agent
script_filename
server_admin
server_signature
request_uri
ident_username
ident_ostype
session_id

That's all folks. Official manual will be written in DocBook.
Hopefully soon.

Further progress:

 1. Raw convertor
 2. Tunning and testing
 3. Basic front-end to weblog data
 4. Basic documentation
 5. Development release
 6. Advanced front-end to weblog data
 7. Second development release
 8. Full documentation
 9. Stable release
10. Perl API


Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top