ki Posted January 4, 2007 Share Posted January 4, 2007 ok ive been working on an ip banning script, but its not working so im pissed off, because these people wont stop spamming my site and theyre using the same ip so this is what i got.[code]$ipArray = array('217.159.200.187');if($_SERVER['REMOTE_ADDR'] == $ipArray) {header("Location: http://www.google.com/");die();}[/code]the array is for others to come Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted January 4, 2007 Share Posted January 4, 2007 You need to use the in_array(...) function to test if a value is in an array of values.As soon as you ban the IP they are using they will find another one to use.You need to close the loop hole in your site that allows the SPAMMING to occur. Quote Link to comment Share on other sites More sharing options...
ki Posted January 4, 2007 Author Share Posted January 4, 2007 actually theyre signing up for my site, and then posting. :/also i got this errorWarning: Wrong parameter count for in_array() in /home/tragical/public_html/index.php on line 29 Quote Link to comment Share on other sites More sharing options...
SharkBait Posted January 4, 2007 Share Posted January 4, 2007 Authenticate their account prior to allowing them to do anything with your site? Send them a link in an email use a hash in the authenticate link back to your site and test it against what they entered? People use the MD5 hash of the password to do this usually.Use captcha's to discourage scripting/bots for doing dumb thingsRequire their posts to be moderated until they post a certain amount?Temporary ban their IP address block such as: 217.159.200.* ??[code]<?php$ipArray = array('217.159.200.187');if(in_array($_SERVER['REMOTE_ADDR'], $ipArray)) {header("Location: http://www.google.com/");exit();}?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.