Hello , for some days i have been struggeling with making only certain ips accessing my family site since i only want my family to be enable to access the site. ill need some help by your guys. This is how far i have gotten and if ip is not in database it will redirect to www.google.se :
EDIT : here is the site i currently tired the script on : http://nattlir.co.cc/
PHP:
$ip =$_SERVER['REMOTE_ADDR'];
$result = mysql_query('SELECT * FROM `ips` WHERE `ip`="' . $ip . '"');
if(mysql_affected_rows($link) < 0){
header('location:http://google.se');
}
EDIT : here is the site i currently tired the script on : http://nattlir.co.cc/
Last edited: