How to limit access in a second of a IP using .htaccess?
Limit and auto ban the IP which access more than x times in a second?
redstrike
4:40 am on Jul 10, 2007 (gmt 0)
I am using a shared hosting.
How can i limit and auto ban the IPs which access more than x times in a second?
physics
5:48 am on Jul 10, 2007 (gmt 0)
If your pages are PHP, ASP or another server side language then you could place a snippet of code at the top of each page which would do this. In PHP you can get at the IP using $_SERVER['REMOTE_ADDR']. Then you save this in a file or database every time the page is accessed. If too many requests come from an IP then add it to a ban list. The ban list is checked on every request before doing anything else. If the IP is on the ban list then 301 the user to localhost or just give them a not found error.
redstrike
4:43 pm on Jul 10, 2007 (gmt 0)
Thanks for your help!
I could understand your meaning... but i am not a coder...
Could you help me code that? (save IP to a file and do something like you answer)...
Sorry about my lacking of skill! Thank you very much!