Block ISP - Country - Regions (Script For Traffic Exchanges)

This script was posted in the Kilohits thread but it should be available on this forum as it's own thread. The script is easily customizable to any type of block that you want to only get the type of traffic that you want out of Traffic Exchanges. Blocking Hostname/ISP: Blocking Hostname/ISP:
Code:
<div id="ipLookup"></div>
<script>
var hostnames = [
    "Amazon",
    "Com Hem AB",
    "Amazon.com",
    "Microsoft Azure",
    "Google Cloud"
]
function getIP(json) {
    if (json.isp) {
        if (hostnames.some(function (hostname) { return json.isp.indexOf(hostname) !== -1})) {
            window.location = ""; //Your website inside the quotes which gets blocked to the website that you enter
        } else {
            window.location = ""; //your website that will get the good traffic that is not blocked.
        }
    }
}
</script>
<script src="//extreme-ip-lookup.com/json/?callback=getIP" async defer></script>
Blocking Country should look something like this:
Code:
<div id="ipLookup"></div>
<script>
var country = [
    "United States",
    "Sweden",
    "India",
    "United Kingdom",
    "France"
]
function getIP(json) {
    if (json.country) {
        if (country.some(function (country) { return json.Country.indexOf(country) !== -1})) {
            window.location = ""; //Your website inside the quotes which gets blocked to the website that you enter
        } else {
            window.location = ""; //your website that will get the good traffic that is not blocked.
        }
    }
}
</script>
<script src="//extreme-ip-lookup.com/json/?callback=getIP" async defer></script>
You can even block out cities, latitude of IPs, continents and a lot more.
To check the ISP or Country of an IP address you will use: http://extreme-ip-lookup.com/

No comments:

Post a Comment

Free traffic

TraffBoost.NET