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>
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>
To check the ISP or Country of an IP address you will use: http://extreme-ip-lookup.com/
No comments:
Post a Comment