Block or Allow access to PHP script based on remote IP and CIDR list

400px-CIDR_Address Spam…we all hate it. It is nice when things like reCaptcha and Asimet work but these Chinese have a way of bypassing those spam filters and then fill your blog or website with useless comments and fake registrations. So, how about a way to just block all ip addresses coming from a specific region from viewing your registration page or comment box? Well…find below some steps to follow to do exactly that.

Continue reading