mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Fix per loggare anche IP locali
This commit is contained in:
@@ -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'];
|
||||
|
Reference in New Issue
Block a user