I found this script on the web... I was wondering if anyone knows how to add IP address to this script.
When I try the comma approach ('44.44.44.44','44.445.55.55') it ends up blocking everything. It also doesn?t work if i do this:
if (ip == "664.43434.13479.23429");
if (ip == "664.4664.13479.23429");
if (ip == "664.44354.13479.23429")
Anywas that IP is fake just incase you dont know, I have a website in which some forms get spammed, and I know the IP address and want to be able to block them but I cant figure out how to add multiple IP's to this script.
<script language="javascript">
var ip = ''
if (ip == "664.43434.13479.23429") {
alert("Go away, your IP has been banned");
{location.href="http://www.dfsdfsdf.com" } }
</script>
Instead of using semicolons, try using "or".Originally posted by adamstang@Mar 26 2005, 01:06 AM
if (ip == "664.43434.13479.23429");
if (ip == "664.4664.13479.23429");
if (ip == "664.44354.13479.23429")
if (ip == "664.43434.13479.23429") or
if (ip == "664.4664.13479.23429") or
if (ip == "664.44354.13479.23429")
That's what you do in php, so it might work.
Bookmarks