mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Updated IP stuff
git-svn-id: file:///svn/phpbb/trunk@1537 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1e170e5be9
commit
9c638c60b5
1 changed files with 3 additions and 11 deletions
|
@ -142,17 +142,9 @@ $nav_links['author'] = array (
|
|||
//
|
||||
// Obtain and encode users IP
|
||||
//
|
||||
if(!empty($HTTP_CLIENT_IP))
|
||||
if( !empty($HTTP_X_FORWARDED_FOR) )
|
||||
{
|
||||
$client_ip = ( ereg("[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+", $HTTP_CLIENT_IP) ) ? $HTTP_CLIENT_IP : $REMOTE_ADDR;
|
||||
}
|
||||
else if(!empty($HTTP_X_FORWARDED_FOR))
|
||||
{
|
||||
$client_ip = ( ereg("^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)", $HTTP_X_FORWARDED_FOR, $ip_list) ) ? $ip_list[0] : $REMOTE_ADDR;
|
||||
}
|
||||
else if(!empty($HTTP_PROXY_USER))
|
||||
{
|
||||
$client_ip = ( ereg("[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+", $HTTP_PROXY_USER) ) ? $HTTP_PROXY_USER : $REMOTE_ADDR;
|
||||
$client_ip = ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", $HTTP_X_FORWARDED_FOR, $ip_list) ) ? $ip_list[1] : $REMOTE_ADDR;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue