That is one way of doing it, but ISPs are assigned blocks of IP addresses. So you can also find the block of IP addresses and block it instead…
You get the range of addresses using http://arin.net/ by searching on a given IP address. Look for the CIDR field, then copy it to your .htaccess like so:
deny from 188.8.131.52/19
----------------------[/code]This would eliminate the web server having to perform a DNS lookup to get the domain name, but would fail if the party you are trying to block switches to a different net block.
Perl / MySQL / HTML+CSS