Locate the function bb_insert_post
in file functions.bb-posts.php, then find the line:
$ip_address = $_SERVER['REMOTE_ADDR'];
The real (*cough*) IP of the user can be retrieved with this function:
function get_real_ip()
{
$ip = '';
$u = 'unknown';
if(($ip = getenv('HTTP_CLIENT_IP')) && strcasecmp($ip, $u)) {}
elseif(($ip = getenv('REMOTE_ADDR')) && strcasecmp($ip, $u)) {}
elseif(($ip = getenv('HTTP_X_FORWARDED_FOR')) && strcasecmp($ip, $u)) {}
elseif(isset($_SERVER['REMOTE_ADDR']) && ($ip = $_SERVER['REMOTE_ADDR']) && strcasecmp($ip, $u)) {}
else return $u;
return $ip;
}
Locate the function bb_insert_post
in file functions.bb-posts.php, then find the line:
$ip_address = $_SERVER['REMOTE_ADDR'];
The real (*cough*) IP of the user can be retrieved with this function:
function get_real_ip()
{
$ip = '';
$u = 'unknown';
if(($ip = getenv('HTTP_CLIENT_IP')) && strcasecmp($ip, $u)) {}
elseif(($ip = getenv('REMOTE_ADDR')) && strcasecmp($ip, $u)) {}
elseif(($ip = getenv('HTTP_X_FORWARDED_FOR')) && strcasecmp($ip, $u)) {}
elseif(isset($_SERVER['REMOTE_ADDR']) && ($ip = $_SERVER['REMOTE_ADDR']) && strcasecmp($ip, $u)) {}
else return $u;
return $ip;
}