Search

Generator for blocking "Bad Traffic"...

Welcome

With this generator you can block nearly every country from accessing your website. Unwanted visitors will be redirected to http://youarebanned.info. It's spezialized in websites programmed with PHP.
It's also perfect for Glype, Zelune and PHProxy.
Note: there are problems with the IE8 and this generator. Firefox, older versions of IE, Opera and Safari should do fine.


Advantages:

There are many many more advantages and endless possibilities of using it.


How it works:

It's based on Maxminds geoip-database. Their database contains the country names and ip ranges. This codegenerator creates a list with the countries you would like to block and redirect.


What do I need?

There are two packages you can download:
1. Package contains the GeoIP.dat, geoip.inc and the redirect.php with the whole logic. Without the redirect.php this generated code can't work. This package works like a blacklist. Every country you put into the code generator will be block from your page.
Download the package here: Blacklistpackage.zip

GeoIP.dat / geoip.inc License and © by Maxmind

2. Package contains the same file, but works like a whitelist. Every country you put into the code generator will be allowed on your page. Every country, which doesn't match one of the selected countries will be blocked.
Download the package here: Whitelistpackage.zip

GeoIP.dat / geoip.inc License and © by Maxmind


Manual download of the files

1. File (GeoIP.dat ©Maxmind):
You can find it on: Click here
Click on "Download the latest GeoLite Country Binary Format" and download the file. Unpack it with Winrar or any other packer.

2. File (geoip.inc ©Maxmind):
The second file is a API for PHP. It contains functions which are making it posible to access the GeoIP.dat-file. Go to: Click here
Click on "Download" under "Pure PHP module" and right-click("Save as...") on "geoip.inc" and download it.

3. File (redirect.php ©youarebanned.info):
And the last file: Redirect.zip
It contains the functions neccessary for checking if the visitor is from one country, which you have banned.
This file does the whole work! So don't forget it! Unpack it with Winrar or any other packer.

[Optional] 4. File (redirect.php ©youarebanned.info):
It is also possible to use this generator as a whitelist. So you just select the countries you want to allow to visit your page. The code of the generator is the same.
You just need this file: Whitelist_Redirect.zip


Now you should upload all files into the SAME DIRECOTRY.


Select the countries you want do block:

Just doubleclick on the country you want to block and the code will be generated. You can select so many countries as you want and it doesn't matter if you clicked on some countries a few times. The blocking will work.

Select the Country you want to block:



Your php-code:



Setting the "$pathToNeededFiles"-variable:

1. Example: The file(for example index.php), where you want to insert the code, is in the same directory like the uploaded files, so you don't need to do anything.

2. Example: The file(for example index.php), where you want to insert the code, is NOT in the same direcotry like the uploaded files, so we need to change the $pathToNeededFiles.

Example: The uploaded files are in a directory called "functions", so you need to modify the $pathToNeededFiles into $pathToNeededFiles = "/functions/"

Example: The uploaded files are above the directory with your index.php.
Code: $pathToNeededFiles = "../"

Example: The uploaded files are in a directory called "functions" above the directory with your index.php.
Code: $pathToNeededFiles = "../functions/"



Installing the code:

You need to paste the code into the top of your file. For example a index.php:

<html>
<head>
<title>yourpage.com</title>
</head>
<body>
 <!-- Content of your page -->
</body>
</html>


And here the index.php with the blocking-code:

<?php
$countriesToBlock = array("IR", "IQ", "SA", "CN");
$pathToNeededFiles = "";
include $pathToNeededFiles . "redirect.php";
?>
<html>
<head>
<title>yourpage.com</title>
</head>
<body>
 <!-- Content of your page -->
</body>
</html>


VERY IMPORTANT: DO NOT PUT THE CODE AFTER A HTML EXPRESION!
YOU WILL GET AN ERROR! THE CODE HAS TO BE EXECUTED BEFORE THE PAGE SENDS ANY HTML TO THE VISITOR!


If you like this service, please donate. Every cent counts!




Installing the code in Glype (show / hide)

The Glype proxy is using themes. They can be found in the directory "themes". You need to select the theme you are using. In most cases you will find a file called "framedForm.inc.php".

Example for the framedForm.inc.php:

<?php
##############################################
## FRAMED FORM : Displays on proxified pages
##############################################
// Define variables for use in form
$return = urlencode('browse.php?' . $_SERVER['QUERY_STRING']);
?<

Now put the code right behind the php-start-tag in the top of this file.

<?php
$countriesToBlock = array("IR", "IQ", "SA", "CN");
$pathToNeededFiles = "";
include $pathToNeededFiles . "redirect.php";
##############################################
## FRAMED FORM : Displays on proxified pages
##############################################
// Define variables for use in form
$return = urlencode('browse.php?' . $_SERVER['QUERY_STRING']);
?<

That's all.


Installing the code in PHProxy (show / hide)

If you like to install the code in the PHProxy, open the index.php. Search for the following code (usually line 520):

//
// OPEN SOCKET TO SERVER
//

do
{
$_retry = false;

Insert your code into to do-while-loop:

//
// OPEN SOCKET TO SERVER
//
do
{
$countriesToBlock = array("IR", "IQ", "SA", "CN");
$pathToNeededFiles = "";
include $pathToNeededFiles . "redirect.php";

$_retry = false;

That should do the trick.


Installing the code in Zelune (show / hide)

Open the index.php and search for the following expersions (usually line 106):

function parse_html ($string) {
$parse = array(

Put your code directly after the bracket:
function parse_html ($string) {

$countriesToBlock = array("IR", "IQ", "SA", "CN");
$pathToNeededFiles = "";
include $pathToNeededFiles . "redirect.php";

$parse = array(



Adding new countries manually:

If you like to add more countries, which you want to block, you can use this code generator to create new code. But sometimes you want to add just one or two new countries. This can be done really fast by putting the two-digit country code into the $countriesToBlock = array("IR", "IQ", "SA", "CN");. For example: We want to add Germany to the blocked countries. The country code for Germany is DE.(See below for more country codes).
Now we put the country code into the array:
$countriesToBlock = array("IR", "IQ", "SA", "CN", "DE");
It is important to seperate the last entry from the new entry by a comma and to put the country code into quotation marks.

Your Ad Here

Country code list (show / hide)

Country code Country
APAsia/Pacific Region
EUEurope
ADAndorra
AEUnited Arab Emirates
AFAfghanistan
AGAntigua and Barbuda
AIAnguilla
ALAlbania
AMArmenia
ANNetherlands Antilles
AOAngola
AQAntarctica
ARArgentina
ASAmerican Samoa
ATAustria
AUAustralia
AWAruba
AZAzerbaijan
BABosnia and Herzegovina
BBBarbados
BDBangladesh
BEBelgium
BFBurkina Faso
BGBulgaria
BHBahrain
BIBurundi
BJBenin
BMBermuda
BNBrunei Darussalam
BOBolivia
BRBrazil
BSBahamas
BTBhutan
BVBouvet Island
BWBotswana
BYBelarus
BZBelize
CACanada
CCCocos (Keeling) Islands
CDCongo, The Democratic Republic of the
CFCentral African Republic
CGCongo
CHSwitzerland
CICote D'Ivoire
CKCook Islands
CLChile
CMCameroon
CNChina
COColombia
CRCosta Rica
CUCuba
CVCape Verde
CXChristmas Island
CYCyprus
CZCzech Republic
DEGermany
DJDjibouti
DKDenmark
DMDominica
DODominican Republic
DZAlgeria
ECEcuador
EEEstonia
EGEgypt
EHWestern Sahara
EREritrea
ESSpain
ETEthiopia
FIFinland
FJFiji
FKFalkland Islands (Malvinas)
FMMicronesia, Federated States of
FOFaroe Islands
FRFrance
FXFrance, Metropolitan
GAGabon
GBUnited Kingdom
GDGrenada
GEGeorgia
GFFrench Guiana
GHGhana
GIGibraltar
GLGreenland
GMGambia
GNGuinea
GPGuadeloupe
GQEquatorial Guinea
GRGreece
GSSouth Georgia and the South Sandwich Islands
GTGuatemala
GUGuam
GWGuinea-Bissau
GYGuyana
HKHong Kong
HMHeard Island and McDonald Islands
HNHonduras
HRCroatia
HTHaiti
HUHungary
IDIndonesia
IEIreland
ILIsrael
INIndia
IOBritish Indian Ocean Territory
IQIraq
IRIran, Islamic Republic of
ISIceland
ITItaly
JMJamaica
JOJordan
JPJapan
KEKenya
KGKyrgyzstan
KHCambodia
KIKiribati
KMComoros
KNSaint Kitts and Nevis
KPKorea, Democratic People's Republic of
KRKorea, Republic of
KWKuwait
KYCayman Islands
KZKazakhstan
LALao People's Democratic Republic
LBLebanon
LCSaint Lucia
LILiechtenstein
LKSri Lanka
LRLiberia
LSLesotho
LTLithuania
LULuxembourg
LVLatvia
LYLibyan Arab Jamahiriya
MAMorocco
MCMonaco
MDMoldova, Republic of
MGMadagascar
MHMarshall Islands
MKMacedonia
MLMali
MMMyanmar
MNMongolia
MOMacau
MPNorthern Mariana Islands
MQMartinique
MRMauritania
MSMontserrat
MTMalta
MUMauritius
MVMaldives
MWMalawi
MXMexico
MYMalaysia
MZMozambique
NANamibia
NCNew Caledonia
NENiger
NFNorfolk Island
NGNigeria
NINicaragua
NLNetherlands
NONorway
NPNepal
NRNauru
NUNiue
NZNew Zealand
OMOman
PAPanama
PEPeru
PFFrench Polynesia
PGPapua New Guinea
PHPhilippines
PKPakistan
PLPoland
PMSaint Pierre and Miquelon
PNPitcairn Islands
PRPuerto Rico
PSPalestinian Territory
PTPortugal
PWPalau
PYParaguay
QAQatar
REReunion
RORomania
RURussian Federation
RWRwanda
SASaudi Arabia
SBSolomon Islands
SCSeychelles
SDSudan
SESweden
SGSingapore
SHSaint Helena
SISlovenia
SJSvalbard and Jan Mayen
SKSlovakia
SLSierra Leone
SMSan Marino
SNSenegal
SOSomalia
SRSuriname
STSao Tome and Principe
SVEl Salvador
SYSyrian Arab Republic
SZSwaziland
TCTurks and Caicos Islands
TDChad
TFFrench Southern Territories
TGTogo
THThailand
TJTajikistan
TKTokelau
TMTurkmenistan
TNTunisia
TOTonga
TLTimor-Leste
TRTurkey
TTTrinidad and Tobago
TVTuvalu
TWTaiwan
TZTanzania, United Republic of
UAUkraine
UGUganda
UMUnited States Minor Outlying Islands
USUnited States
UYUruguay
UZUzbekistan
VAHoly See (Vatican City State)
VCSaint Vincent and the Grenadines
VEVenezuela
VGVirgin Islands, British
VIVirgin Islands, U.S.
VNVietnam
VUVanuatu
WFWallis and Futuna
WSSamoa
YEYemen
YTMayotte
RSSerbia
ZASouth Africa
ZMZambia
MEMontenegro
ZWZimbabwe
A1Anonymous Proxy
A2Satellite Provider
O1Other
AXAland Islands
GGGuernsey
IMIsle of Man
JEJersey
BLSaint Barthelemy
MFSaint Martin

Contact:

You can contact my be sending an email to support(at)youarebanned.info