On Fri, 1 Oct 2004 17:38:31 -0400, Joe Szilagyi <[EMAIL PROTECTED]> wrote:
> Hi, I have this working:
> 
> if ($REMOTE_ADDR == "212.3.54.65")  {
>         header("Location: http://www.google.com/search?&q=huzzah";);
> Redirect browser
>         exit;
>         }
> 
> But I want to specify multiple IPs. What's the best recommended way for
> doing that?

One way would be to create an array of ips and look for it in that array:

$ips = array('127.0.0.1','192.168.1.50');

if (in_array($REMOTE_ADDR, $ips)) {

    // do stuff

}

- Brad

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to