Jump to content

ip ban?


ki

Recommended Posts

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
Link to comment
Share on other sites

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 things

Require 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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.