Membatasi IP pengunjung ke situs anda
Saturday September 02nd 2006, 9:36 pm
Filed under: Tips & Trik

Kadang-kadang ada permintaan yang seperti ini, “tolong donk, saya hanya mau orang indo melihat situs saya, orang luar negri ngga bole”

Ok cukup jadikan script dibawah ini sebagai index.php

// Thx to ruddy engineering this script

$allowedip[]=”203.130″; // masukkan list network ISP lain dibawah ini
$allowedip[]=”202.134″;
$allowedip[]=”202.159″;
$oke=false;
$r=explode(”.”,$REMOTE_ADDR);
foreach($allowedip as $key=>$val){
if($val==$r[0]) $oke=true;
}
if($oke){
Header(”Location: http://akbar.info”);
} else {
Header(”Location: http://akbar.info/nggabole.html”);
}
?>


No Comments so far
Leave a comment



Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

(required)

(required)