Author Topic: Block IP Script - JavaScript  (Read 7465 times)


  • Full Member
  • ***
  • Posts: 149
Block IP Script - JavaScript
« on: November 05, 2012, 01:50:34 AM »
Hello folks. Since my past week I had been working on Block IP script and today I am done making and thought to share it with you guys, you can use it if you need it for sure. Although, it was a exercise question from the book I bought of JavaScript.
Code: [Select]
var ip = '<!--#echo var="REMOTE_ADDR"-->'
var bannedip=["", ""]

var handleips=bannedip.join("|")
handleips=new RegExp(handleips, "i")

if (!=1){
alert ("You are banned from this website. Wait...")


  • Administrator
  • Full Member
  • *****
  • Posts: 158
Re: Block IP Script - JavaScript
« Reply #1 on: November 08, 2012, 03:36:45 PM »
Good luck, I can see you are going right way..

So when user is from bad IP ,he is redirect to :)


  • Full Member
  • ***
  • Posts: 149
Re: Block IP Script - JavaScript
« Reply #2 on: November 08, 2012, 11:17:28 PM »
Haha, Yeah that is the basic way of popularity, most of the programmers are always curious about websites so they will surely visit it if I'll post this script somewhere else. :)



Do you know?

By participating in our community you can get free top level domain as well learn about Search Engine Optimization, Server management and more..
Join Now!