Quote:
Originally Posted by The Dok
What would be the code for numerous IP's?
|
I'm not a PHP expert. There are two ways I know of to approach this.
1. Chain a couple of ORs together
PHP Code:
||$_SERVER['REMOTE_ADDR']=='192.168.0.1' ||$_SERVER['REMOTE_ADDR']=='192.168.100.1'
2. Use strpos to see if the address is in a string of addresses
PHP Code:
||strpos('192.168.0.1,192.168.100.1', $_SERVER['REMOTE_ADDR'])
I saw an example at
http://us3.php.net/manual/en/function.strpos.php#47322 that uses arrays.