| verzia 1.47, 2002/10/28 20:10:01 |
verzia 1.48, 2002/11/11 22:09:19 |
|
|
| * http://www.platon.sk/projects/phpWebLogAnalyzer/ |
* http://www.platon.sk/projects/phpWebLogAnalyzer/ |
| */ |
*/ |
| |
|
| /* $Platon: phpWebLogAnalyzer/phpWebLogAnalyzer.inc.php,v 1.46 2002/10/25 00:37:55 nepto Exp $ */ |
/* $Platon: phpWebLogAnalyzer/phpWebLogAnalyzer.inc.php,v 1.47 2002/10/28 20:10:01 nepto Exp $ */ |
| |
|
| define('WEB_LOG_VALUE_SUBSTR_LENGTH', 255); |
define('WEB_LOG_VALUE_SUBSTR_LENGTH', 255); |
| define('WEB_LOG_SESSION_TIMEOUT_DEFAULT', 1800); |
define('WEB_LOG_SESSION_TIMEOUT_DEFAULT', 1800); |
|
|
| |
|
| var $_session_timeout; |
var $_session_timeout; |
| var $_session_keys = array('remote_addr', 'http_user_agent'); |
var $_session_keys = array('remote_addr', 'http_user_agent'); |
| /* |
|
| var $_session_keys = array( |
/* Ident variables |
| 'remote_addr', |
|
| 'http_user_agent', |
$_ident_timeout - timeout for retrieving ident data from socket |
| 'ident_username', |
*/ |
| 'ident_ostype'); |
var $_ident_timeout; |
| */ |
|
| |
|
| /* Raw log variable |
/* Raw log variable |
| |
|
|
|
| * Object constructor. |
* Object constructor. |
| */ |
*/ |
| |
|
| function Web_Log($dsn = '', $session_timeout = 0) /* {{{ */ |
function Web_Log($dsn = '', $session_timeout = 0, $ident_timeout = 0) /* {{{ */ |
| { |
{ |
| |
|
| if (empty($session_timeout)) |
if (empty($session_timeout)) |
| $session_timeout = WEB_LOG_SESSION_TIMEOUT_DEFAULT; |
$session_timeout = WEB_LOG_SESSION_TIMEOUT_DEFAULT; |
| |
|
| $this->_session_timeout = intval($session_timeout); |
$this->_session_timeout = intval($session_timeout); |
| |
$this->_ident_timeout = intval($ident_timeout); |
| $this->_raw_log = WEB_LOG_RAW_LOG_DEFAULT; |
$this->_raw_log = WEB_LOG_RAW_LOG_DEFAULT; |
| $this->_truncate_names = WEB_LOG_TRUNCATE_NAMES_DEFAULT; |
$this->_truncate_names = WEB_LOG_TRUNCATE_NAMES_DEFAULT; |
| $this->_truncate_qstrings = WEB_LOG_TRUNCATE_QUERY_STRINGS_DEFAULT; |
$this->_truncate_qstrings = WEB_LOG_TRUNCATE_QUERY_STRINGS_DEFAULT; |
|
|
| if ($this->_props['ident_username']['enabled'] |
if ($this->_props['ident_username']['enabled'] |
| || $this->_props['ident_username']['enabled']) { |
|| $this->_props['ident_username']['enabled']) { |
| |
|
| $ident = new Net_Ident($remote_addr, |
$ident = new Net_Ident($remote_addr, |
| stripslashes($HTTP_SERVER_VARS['REMOTE_PORT']), |
stripslashes($HTTP_SERVER_VARS['REMOTE_PORT']), |
| stripslashes($HTTP_SERVER_VARS['SERVER_PORT'])); |
stripslashes($HTTP_SERVER_VARS['SERVER_PORT']), |
| |
0 /* default */, $this->_ident_timeout); |
| |
|
| if (PEAR::isError($ident->query())) { |
if (PEAR::isError($ident->query())) { |
| // print "Ident query failed: " . $ident->error() . ".<br>"; |
// print "Ident query failed: " . $ident->error() . ".<br>"; |