Call-time pass-by-reference has been deprecated for IP
<p>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(). </p>

<p>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.</p>

<p>Any advice would be apreciated.</p>

<pre><code>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 ( &amp;$_SERVER [ $c ] ) ) {
            return ip_first ( $_SERVER [ $c ] );
        }
    }

    return $_SERVER['REMOTE_ADDR'];
</code></pre>

<p>}</p>

<p>Thnaks in advance</p>

<p>Wayne</p>
