PDA

View Full Version : Help me please!



TaintedPearls
November 19th, 2005, 10:02
How can I ban someone from my site who is stealing my content? Please can someone help me?

freak127
November 19th, 2005, 10:24
Do you know the person's IP address? If so, then you could use this code:


<?
$ip = $_SERVER['REMOTE_ADDR'];
if($ip == "ip.you.want.to.ban.here")
{
echo "Sorry, but you are banned from this website for stealing content.";
}
else
{
//The rest of the site code here.
}
?>

TaintedPearls
November 19th, 2005, 13:34
i have the logged IP of when the person visited my site. will that work?

freak127
November 19th, 2005, 13:55
It should do. Change 'ip.you.want.to.ban.here' to his IP address and place it there and it should work ;) .

TaintedPearls
November 19th, 2005, 14:16
ok thank you. do i put it on every page or just on the homepage?

ciprian@terra-bit
November 19th, 2005, 18:50
Run the following as root:

iptables -I INPUT -s ip.to.be.banned -j DROP

ryza
November 19th, 2005, 19:57
create a .htaccess file in your main folder,
replace 127.0.0.1 with his real ip:

<Limit GET POST>
order allow,deny
allow from all
deny from 127.0.0.1
</Limit>

felguard
November 19th, 2005, 22:23
You can also block his IP in cpanel with the "IP Deny Manager."

TaintedPearls
November 20th, 2005, 18:47
thanks for the help.

spacegirl
November 21st, 2005, 10:05
np if need any more info just ask