views:

33

answers:

1

Hi there!

I want to disallow proxies and spambots from posting in my website. What is the best way to do so?

I've downloaded a blacklist and my first idea was to disable each of ips in my .htaccess file, but after downloading the list, I found out that it contained almost 9 million entries.

My other idea was to split each IP in 4 parts and do [1;4] successive SQL queries in my POST.

Yet if I could cache this values on memory, I could inexpensively check for them with something like (:200 (:188 (:10 (:42)))). Is this doable with PHP?

Thanks!

A: 

I've presented the problem in other way, assuming that maintaining such structure was possible, and I've got some other answers here.

I'll create a RAMDISK with loads of inodes to represent the mentioned tree, and hopefully it will work.

konr