Page 2 of 3

Re: SmartCJ Incoming Traffic GEO Block

Posted: Mon Jun 11, 2018 6:19 pm
by zweiporn
i think i have do something wrong in it. sry im not a php pro.

here is the file how it looks now:


<?php
if (!defined('BASE_DIR')) define('BASE_DIR', '/home/ftplogin/hornybitches.org/smartcj/');
if ($_SERVER['GEOIP_COUNTRY_CODE'] == 'IN');
if ($_SERVER['GEOIP_COUNTRY_CODE'] == 'ID');
if ($_SERVER['GEOIP_COUNTRY_CODE'] == 'PK');
if ($_SERVER['GEOIP_COUNTRY_CODE'] == 'CN');
if ($_SERVER['GEOIP_COUNTRY_CODE'] == 'RU'); {
$_GET['dont_count'] = true;
}
?>

Re: SmartCJ Incoming Traffic GEO Block

Posted: Mon Jun 11, 2018 6:47 pm
by admin
no...

if ($_SERVER['GEOIP_COUNTRY_CODE'] == 'CN' or $_SERVER['GEOIP_COUNTRY_CODE'] == 'CN' or $_SERVER['GEOIP_COUNTRY_CODE'] == 'CN' and so on) {
$_GET['dont_count_in_trade'] = true;
}

Re: SmartCJ Incoming Traffic GEO Block

Posted: Mon Jun 11, 2018 8:11 pm
by zweiporn
i'm not a super php pro like you. i dont know where to put this code or what to do. you put here a 5 seconds answer inside and i try now 5 hours to solve a problem.
i have no backup from the original one from the start and now i can wait for a 5 seconds answer or can delete the script because i loose money when my site is offline or only the header will showed because of errors.
pisses me inside real off because it makes me angry when i can't solve a problem myself and need informations. but this is no help.
sorry.

Re: SmartCJ Incoming Traffic GEO Block

Posted: Tue Jun 12, 2018 3:53 am
by admin
You dont have to be a pro


if ($_SERVER['GEOIP_COUNTRY_CODE'] == 'CN') {
$_GET['dont_count_in_trade'] = true;
}

in common.php
that's it

and there's an easy way to find an error.
You take take my code, see that it works, then start to modify it in the way you need it. If it doesn't work at some stage - you just roll back your changes.

Re: SmartCJ Incoming Traffic GEO Block

Posted: Tue Jan 22, 2019 5:53 pm
by zweiporn
Ok but this is only for 1 Country.
It is working real nice! thanks...
But can you Post the Code how i have put it in when i want to block 5,10 or 20 countries.
Because this is what i need.
I have test the code above and it was not working with the ,,or'' between it.

thanks

Re: SmartCJ Incoming Traffic GEO Block

Posted: Tue Jan 22, 2019 5:56 pm
by zweiporn
This is how the code looks now:
http://justpic.info/images4/6397/Screen ... 185518.png

but i need it for more then 1 country.

Re: SmartCJ Incoming Traffic GEO Block

Posted: Wed Jan 23, 2019 5:21 am
by admin
the easiest way for you would be just copy and paste the same code as many times as you need it

or you can try

if ($_SERVER['GEOIP_COUNTRY_CODE'] == 'CN' or $_SERVER['GEOIP_COUNTRY_CODE'] == '...') {

Re: SmartCJ Incoming Traffic GEO Block

Posted: Wed Jan 23, 2019 10:29 am
by zweiporn
ok... same thing still incoming hits from the selected countries.
to erease errors in our conversation i hope we can make it shorter.
i will put now all informations that can be wrong.
Please tell me complete code or better write it down.

see screenshots:
http://justpic.info/images4/6fa5/1.png
http://justpic.info/images4/6ac3/2.png

the common.php file is in folder: /scj/cgi

Re: SmartCJ Incoming Traffic GEO Block

Posted: Wed Jan 23, 2019 1:49 pm
by admin
I think you also have common.php at the root of your domain and you didn't change it

Re: SmartCJ Incoming Traffic GEO Block

Posted: Wed Jan 23, 2019 1:57 pm
by zweiporn
Its working now! Yes the File was in the root...
that was the error! Thanks so much!!!!
i was searching for this option for so long time! THANKS!!!