I am getting this error: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of ip_valid().
somewhere in these lines of code. Problem is I am not that strong in PHP to figure out what I need to modify to fix it.
Any advice would be apreciated.
function getIP ()
{
$check = array(
'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR',
'HTTP_FORWARDED', 'HTTP_VIA', 'HTTP_X_COMING_FROM', 'HTTP_COMING_FROM',
'HTTP_CLIENT_IP'
);
foreach ( $check as $c ) {
if ( ip_valid ( &$_SERVER [ $c ] ) ) {
return ip_first ( $_SERVER [ $c ] );
}
}
return $_SERVER['REMOTE_ADDR'];
}
Thnaks in advance
Wayne