That code is to be placed on every page, for instance, in Threads?? That's too much work for me...
no, an include to that page is included on every page; which in threads is as simple as adding it to your header include as:
include("/path/to/blacklist.php");
And htaccess will only work in apache, not to mention youd have to make manual updates; whereas mine updates everything automatically with no work (after being installed) being needed.
blacklist.dat and blacklist.php go to your web root. The include to blacklist.php goes in your header include on yoru ubb.
Example:
/btra/ (755)
/btra/index.php (644)
/blacklist.dat (666 or 777)
/blacklist.php (644)
Your header will hold the include to your blacklist.php file. You need this in your header as you're stopping the page loading if the users ip is blacklisted; if it's in the footer it'll stop after the page has loaded (in which case it'd be pointless).