I have an area on my site that I would like to only give access to a few people. My code now only works with one ip address, but I would like to be able to add more.
Here is what I am using:
$ipaddress = $_SERVER['REMOTE_ADDR'];
if($ipaddress == '111.111.111.111') {
//Action for allowed IP Addresses
} else {
//Action for all other IP Addresses
echo 'You are not authorized here.';
echo "<br />IP Address: ".$_SERVER['REMOTE_ADDR'];
exit;
}