//Written by Matt Toigo
//CHECK FOR | Symbol in variables before logging
require('settings.inc');
$host_name7=gethostbyaddr($_SERVER['REMOTE_ADDR']);
$rootdir51=$_SERVER['DOCUMENT_ROOT'];
$ip = $REMOTE_ADDR; // Get visitor's ip address
$fact = explode(".",$ip); // create an array with the ip numbers
$ip_code = $fact[3] + $fact[2]*256 + $fact[1] * 65536 + $fact[0] * 16777216; // calculate the base 10 ip
$date = date('Y-m-d G:i:s');
if(!$_SESSION['hit'])
{
$unique = 1;
$_SESSION['hit'] = TRUE;
}
else
{
$unique = 0;
}
$line = $date.'|'.$_SERVER[HTTP_USER_AGENT].'|'.$_SERVER[REMOTE_ADDR].'|'.$_SERVER[HTTP_REFERER].'|'.$_SERVER[REQUEST_URI].'|'.$unique.'|'.$ip_code.'|'.$host_name7."\n";
$statistics="$rootdir51/webstats1/log.txt";
if($SETTINGS['admin_ip']!=$_SERVER['REMOTE_ADDR'])
{
$file = fopen($statistics, 'a+');
fwrite($file, $line);
fclose($file);
}
?>
|
Παρ, 20 Απρ 2018 |
|
|
|
|
|
|
|
|
|
|
|
include "footer.php";
?>