| verzia 1.1, 2001/09/20 14:59:01 |
verzia 1.2, 2001/10/02 10:58:07 |
|
|
| * 04/08/2001 - completely rewritten with multiple tables handling |
* 04/08/2001 - completely rewritten with multiple tables handling |
| * 20/09/2001 - code style improvements |
* 20/09/2001 - code style improvements |
| * - import into CVS |
* - import into CVS |
| |
* 02/10/2001 - added support for remote address resolving |
| */ |
*/ |
| |
|
| /* |
/* |
| Riadok 139 function phpWebLogAnalyzer_register_acce |
|
| Riadok 140 function phpWebLogAnalyzer_register_acce |
|
| global $SCRIPT_FILENAME; |
global $SCRIPT_FILENAME; |
| global $REQUEST_URI; |
global $REQUEST_URI; |
| |
|
| |
$ip_addr = ''; |
| |
$proxy_addr = ''; |
| |
$hostname = ''; |
| |
$ident_user = ''; |
| |
$ident_ostype = ''; |
| |
|
| /* |
/* |
| * Ident protocol stuff |
* IP address & proxy server getting. |
| |
*/ |
| |
|
| |
if (getenv('HTTP_X_FORWARDED_FOR') != '') { |
| |
$ip_addr = getenv('HTTP_X_FORWARDED_FOR'); |
| |
$proxy_addr = getenv('REMOTE_ADDR'); |
| |
} |
| |
else { |
| |
$ip_addr = getenv('REMOTE_ADDR'); |
| |
} |
| |
|
| |
/* |
| |
* Host name resolving. |
| */ |
*/ |
| |
|
| $addr = getenv('HTTP_X_FORWARDED_FOR') != '' ? |
$hostname = @gethostbyaddr($ip_addr); |
| getenv('HTTP_X_FORWARDED_FOR') : getenv('REMOTE_ADDR'); |
|
| |
/* |
| |
* Ident protocol stuff |
| |
*/ |
| |
|
| $ident = new ident( |
$ident = new ident( |
| gethostbyaddr($addr), |
gethostbyaddr($ip_addr), |
| getenv('REMOTE_PORT'), |
getenv('REMOTE_PORT'), |
| getenv('SERVER_PORT') |
getenv('SERVER_PORT') |
| ); |
); |
| Riadok 187 function phpWebLogAnalyzer_register_acce |
|
| Riadok 209 function phpWebLogAnalyzer_register_acce |
|
| 'gateway_interface_id' => phpWebLogAnalyzer_get_id( |
'gateway_interface_id' => phpWebLogAnalyzer_get_id( |
| 'weblog_gateway_interfaces', $GATEWAY_INTERFACE), |
'weblog_gateway_interfaces', $GATEWAY_INTERFACE), |
| 'remote_host_id' => phpWebLogAnalyzer_get_id( |
'remote_host_id' => phpWebLogAnalyzer_get_id( |
| 'weblog_remote_hosts', $REMOTE_HOST), // * |
'weblog_remote_hosts', $hostname), // * |
| 'remote_addr_id' => phpWebLogAnalyzer_get_id( |
'remote_addr_id' => phpWebLogAnalyzer_get_id( |
| 'weblog_remote_addrs', $REMOTE_ADDR), |
'weblog_remote_addrs', $ip_addr), |
| 'remote_port' => $REMOTE_PORT, |
'remote_port' => $REMOTE_PORT, |
| 'auth_type_id' => phpWebLogAnalyzer_get_id( |
'auth_type_id' => phpWebLogAnalyzer_get_id( |
| 'weblog_auth_types', $AUTH_TYPE), // * |
'weblog_auth_types', $AUTH_TYPE), // * |