برای بستن و جلوگیری از ورود از یک ای پی میتوانید از کد زیر استفاده کنیداین کد را در بخش head قالب استفاده کنید
کد: انتخاب همه
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
netscape = (navigator.appName.indexOf("Netscape") != -1);
version4 = (navigator.appVersion.indexOf("4.") != -1);
if (netscape && version4) {
ip = "" + java.net.InetAddress.getLocalHost().getHostAddress();
if (ip.indexOf("<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
netscape = (navigator.appName.indexOf("Netscape") != -1);
version4 = (navigator.appVersion.indexOf("4.") != -1);
if (netscape && version4) {
ip = "" + java.net.InetAddress.getLocalHost().getHostAddress();
if (ip.indexOf("207.136") >= -1)
// This would block anyone from 207.136.xxx.xxx
{
alert("You are not permitted to access this site.");
history.go(-1);
}
}
// End -->
</script>") >= -1)
{
alert("You are not permitted to access this site.");
history.go(-1);
}
}
// End -->
</script>