What is an effective method for banning users from my site?
http, php
Solution
In plain: you can't.
Some user can block to receive cookies, or even to use a proxy to fake it's IP address, you you just can't make sure some user cant access your application.
An (extreme) option is to force all your legitimate users to install a client certificate and to check it at server-side but, as I said, it's a extreme solution. I don't like to install certificates just to access some site.
I suggest you just let it go; sometime in future your troll will get bored and will look for something more useful to do with his/her time.
Problem
I know a lot of scripts handle IP ban, IP range ban etc. I was trying to make a method that would block a user as best as I can. I came up with: - IP block - Setting a cookie - But if a user has a dynamic and doesn't enable cookies this wont do much to him. I don't want to block an IP range because most of my visitors come from the same town and I don't want to block innocent people. - Creating a hash value for multiple variables coming from the user, (like browser and version and something else) and adding them to a table which stores a list of banned users or such values. Thanks for ideas.