Some countries become the source of spammers. They automatically post threads, replies, etc.
We can block them by geoip without using any mods, but we will do certain PHP editing so please be careful a little bit
First, please download all 3 php files on attachment, put it under directory under your root directory, for example assuming your root directory is
you can put those 3 files on
*Note: you can change "geoip_blocker" to other name.
So those 3 files will have this location :
Second, if you want to edit "blocked" message, edit the "geoip-block.php" file, and change this
Into other message for example
Third, to define which country to be blocked, find this line on "geoip-block.php"
into this
The example above will block visitors from Vietnam, Jamaica, and Italy.
Fourth, to block registration, edit "register.php" file,
edit this line
Change into
To block new thread, edit "newthread.php" file, and do the same as above, etc.
We can block them by geoip without using any mods, but we will do certain PHP editing so please be careful a little bit
First, please download all 3 php files on attachment, put it under directory under your root directory, for example assuming your root directory is
Code:
/public_html/
Code:
/public_html/[B][COLOR=#ff0000]geoip_blocker[/COLOR][/B]/
So those 3 files will have this location :
Code:
/public_html/[B][COLOR=#ff0000]geoip_blocker[/COLOR][/B]/geoip-block.php /public_html/[B][COLOR=#ff0000]geoip_blocker[/COLOR][/B]/geoip-lib.php /public_html/[B][COLOR=#ff0000]geoip_blocker[/COLOR][/B]/geoip-update.php
Code:
We do not tolerate spam. Your country is blocked on this website.
Code:
Your country is blocked
PHP Code:
if ($x_country == 'Vietnam' || $x_country == 'Romania') {// change this
PHP Code:
if ($x_country == 'Vietnam' || $x_country == 'Jamaica' || $x_country == 'Italy') {// change this
Fourth, to block registration, edit "register.php" file,
edit this line
PHP Code:
<?php
PHP Code:
<?php
require_once(dirname(__FILE__).'/geoip_blocker/geoip-block.php');