I've got PHPBlackList stabilized now and it works for IP and partial network blocking. I have the blacklist.txt file set up to block most of AFRINIC as an example only. You can fine tune the list yourself adding partial IP's or full IP's. The only real constraint is that I had to append ".X" to the end of all IP's and network addresses. Have a look at the README.txt and blacklist.txt files.
If you are looking for the original PHPBlackList project maintained by Federico Quagliata, please go here:
PHPBlacklist, a PHP code snippet to allow granular control over what IP or network can access your PHP page has been released today. This code has been successfully run on multiple PHP pages - a photo gallery (Gallery2), a blog (SPB), and a Web Site (XOOPS)