Korvin commented on a Page, IP Block  -  Mar 02, 2010
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$bips = array('192.168.1.1','10.0.0.1');
if (in_array($ip, $bips)) {
    header('Location: http://google.com');
}
?>
aboutscript  -  Jan 05, 2013

Might want to put die(); after the header call. Otherwise the rest of the page can still render and the user receives the content.

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.