aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_session.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions_session.inc.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/functions_session.inc.php b/include/functions_session.inc.php
index a15491193..1145d3dcc 100644
--- a/include/functions_session.inc.php
+++ b/include/functions_session.inc.php
@@ -93,7 +93,15 @@ function pwg_session_close()
function get_remote_addr_session_hash()
{
- return vsprintf( "%02X%02X", explode('.',$_SERVER['REMOTE_ADDR']) );
+ $separator = (FALSE === strpos($_SERVER['REMOTE_ADDR'],'.'))
+ ? ':'
+ : '.'
+ ;
+
+ return vsprintf(
+ "%02X%02X",
+ explode($separator,$_SERVER['REMOTE_ADDR'])
+ );
}
/**
@@ -217,4 +225,4 @@ function pwg_unset_session_var($var)
return true;
}
-?> \ No newline at end of file
+?>