if ip in the array redirect php

39

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

Comments

Submit
0 Comments