The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

ban ip script?

View previous topic View next topic Go down

In progress ban ip script?

Post by pety55 on January 10th 2013, 11:57 pm

Is there any ban ip or block then redirect to another site. i found this javascript code but i doesn't know where i must put it
because i tried it on descripton and they can't put all words because of maxium words.

here is a script
<script type="text/javascript">

var bannedips=["84.108.43.133", "11.11.11.11"]

var ip = '<!--#echo var="REMOTE_ADDR"-->'

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

if (ip.search(handleips)!=-1){
alert("Your IP has been banned from this forum")
window.location.replace("http://crystaldekaron-ban.99k.org/")
}

</script>

pety55
New Member

Posts : 14
Reputation : 1
Language : Croatian

Back to top Go down

In progress Re: ban ip script?

Post by SLGray on January 10th 2013, 11:58 pm

Try an announcement that is on all pages.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36657
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

In progress Re: ban ip script?

Post by pety55 on January 11th 2013, 6:47 pm

not work

pety55
New Member

Posts : 14
Reputation : 1
Language : Croatian

Back to top Go down

In progress Re: ban ip script?

Post by Sanket on January 11th 2013, 7:15 pm

Modules>Javascript Codes Management
Enable Javascript code management : Yes
Add the javascript.
Code:
var bannedips=["84.108.43.133", "11.11.11.11"]

var ip = '<!--#echo var="REMOTE_ADDR"-->'

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

if (ip.search(handleips)!=-1){
alert("Your IP has been banned from this forum")
window.location.replace("http://crystaldekaron-ban.99k.org/")
}
Placement: Check all the pages.

See if it works.

Sanket
ForumGuru

Male Posts : 48766
Reputation : 2819
Language : English
Location : Mumbai

http://webartzforum.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum