if ip in the array redirect php code example
Example: if ip in the array redirect php
if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '123.456.789.123')))
{
header('Location: http://www.example.com/sitemaintenance.php');
exit;
}
if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '123.456.789.123')))
{
header('Location: http://www.example.com/sitemaintenance.php');
exit;
}