top



i was looking for a widget or a html code to redirect ip to my custom html ban page.

if there is one i could stick it into the header.

thanks.

Hmm.. i found this script: you can try it and see (:

Code:

Here it will show the visitors IP's
<div id="YourIP">
<script src="http://embed.ipcatch.com/ip/" type="text/javascript"></script>
</div>

here is the JavaScript

<script type="text/javascript">
var yourip = document.getElementById('YourIP')

var bannedIp = new Array();
bannedIp[0] = "##.###.###.###"
bannedIp[1] = "##.###.###.###"

window.onload = checkVisit;

function checkVisit() {
      if (yourip == bannedIp){
        Redirect();
      }
}

function Redirect(){
      location.replace('http://www.google.com/');
}
</script>

Replace the banned IP's with ##.###.###.###, they will be redirected to http://www.google.com/
Im not sure if works (:

didn't work