Block IP Address Visitor Blog

By . Category: javascript, Web Tags: , ,

irnanto.comHow to block Ip Address there is a wide variety of techniques, depending on the desired destination ip block. This time I will share a script block ip address to block a specific website visitor IP using the IP list that has been includ into the script.

Before we create a script to block the IP address, we need to know the IP addresses which will be our block. IP addresses which we will block it, in the form of a public IP visitors.

Block IP Address Visitor Blog

Block IP Address Visitor Blog

How To Block IP Address

How to block this IP address using script of javascript that runs the client side (browser) and will be run in a browser. This IP Block script running user IP detection (using PHP) and match with the IP block list that has been fed before.

If detected the same IP with the IP that has been in the previous list, the web page will be redirected according to the address that has been set in the script. Script block IP address using javascript like below.

<script type=”text/javascript”>
   var bannedips=[“IP address first”,”IP address n”];
    var ip = “<?php echo $_SERVER[‘REMOTE_ADDR’]; ?>”;
    var handleips=bannedips.join(“|”);
    handleips=new RegExp(handleips, “i”);
    if (!=-1){
        alert(“Your IP has been banned from this site. Redirecting…”);

Please try. Block IP Address Visitor Blog discussion on  got here, other times in continued again


No comments yet untuk “Block IP Address Visitor Blog”

Tinggalkan Komentar