Fix per loggare anche IP locali
This commit is contained in:
parent
cbd1e01d29
commit
854f6709a9
|
@ -407,7 +407,9 @@ function create_thumbnails($tmp, $filename, $dir)
|
|||
function get_client_ip()
|
||||
{
|
||||
$ipaddress = '';
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
if (getHostByName(getHostName())){
|
||||
$ipaddress = getHostByName(getHostName());
|
||||
}else if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
|
||||
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
|
|
Loading…
Reference in New Issue