Kamilski.com Personal Developer Blog

26Jan/100

Bad traffic block generator

As I have already posted, "bad traffic" comes from countries like the Islamic Republic of Iran, Iraq or Saudi Arabia and also China. If you don't know what "bad traffic" is, read this post: "What is Bad Traffic?"

As you can see bad traffic depends on his origin, in fact on the country from where the user comes from. It would make no sense to block the users IP-address, because most users are getting dynamic IPs from their Internet Service Providers. When you block a users IP-address, he will get a new IP-address, when he dial into the Internet next time.

What is the solution for this problem?

We have to block the whole country. In this case we won't get "bad traffic" from this country anymore. I have created a code generator and a script, which will allow you to block countries by putting three lines of code into your sites. Here is the link: http://youarebanned.info/webmasters.php

How does the script work?

This script compares the users IP-address with the IP-ranges of the blocked country. I have to mention, that this script does not use a database like MySQL or PostgreSQL. So you don't have to run a SQL-server, which will use much RAM and CPU. So how does it work? The IP-ranges are stored in a file: the GeoIP.dat from Maxminds. When Maxminds publishes a new updated version of their GeoIP-database, you can update the file by downloading it again. No SQL import or others steps needed.

What are the advantages of this script?

  • You don't need any Database like MySQL or PostgreSQL, because the IP-ranges and country names are stored in one file.
  • Updates are done by downloading the GeoIP.dat, so you don't need to update a database like MySQL or PostgreSQL.
  • You don't need (almost) any programming skills. The script is so simples as it could be.
  • You select where to insert the code: people from China are spamming you board with bots? put the code into the log-in-page and get rid of them. People from the Islamic Republic of Iran, Iraq or Saudi Arabia are using your web proxy to watch porn? Put the code into your proxified page. You can earn money, when they click on some advertisement on the front page and block them afterwards.

You will find detailed instructions and examples on how to install the code on normal sites, but also detailed examples for Glype, Zelune and PHProxy. Here is the link again: http://youarebanned.info/webmasters.php

26Jan/100

What is "bad traffic"?

First of all we have to take a look on "good traffic":

"Good traffic" is Internet traffic to a website or a web service, which can be monetized by advertisement or in some other ways. In this case the webmaster earns enough to pay for the server/hosting and gets perhaps some extra money for himself.

"Bad traffic" is Internet traffic to a website or other web services, that create a huge amount of traffic and by this, costs to the webmaster. The difference between "good" and "bad traffic" is, that webmasters have big problems to monetize "bad traffic". Because they get really small money for the clicks on advertisement.

Bad traffic is often abusive. Lets take a look on an example: web proxies (http://mytwitterproxy.com) get much abusive traffic from the Islamic Republic of Iran, Iraq or Saudi Arabia. Users from this countries often visit pornographic content and create massive traffic. When they click on advertisement, there clicks are mostly less worth than one US-cent. As you can see, the income does not cover the expanses.

We assume, that you can categorize good and bad traffic by their origin. In fact you can say that good traffic (good to monetize) comes from North America and from countries in Europe. Really "bad traffic" comes from the Near-East-Countries and from some Asian countries.

This is only one possible definition of good and bad traffic.

   
Easy AdSense by Unreal