Best Blackhat Forum

Full Version: [Code] Redirect traffics base on location or just simply use they location as advantage.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
"Redirect traffics base on location or just simply use they location as advantage."
This is pretty old method for redirect visitor.
It is a simple geo redirect code, you can use it on your landing page.
Insert in between
Code:
Code here
.

For two location redirect:

Code:
<script type="text/javascript" src="http://j.maxmind.com/app/geoip.js"></script>

<script type="text/javascript">
var country= geoip_country_code();

if(country  == "US")      
{
<!--
window.location = "YOUR US OFFER"
//-->
}

else  
{
<!--
window.location = "OTHER OFFER URL"
//-->
}

</script>


This script should redirect the US visitors to your 1st offer site. Then other to your other offer site.




Adding more country that you want to redirect


Code:
<script type="text/javascript" src="http://j.maxmind.com/app/geoip.js"></script>

<script type="text/javascript">
<!--
var country= geoip_country_code();
if(country  == "US" || country  == "GB" || country  == "SG"){
window.location = "YOUR US OFFER";
}else{
window.location = "OTHER OFFER URL";
}
//-->
</script>

This code will redirect 3 selected country to offer 1 rather than 1 country.

Country code reference(not mine):
Code:
http://www.maxmind.com/app/iso3166



Get visitor location info and use it on your advantage.


Sample Site (not mine):

Code:
hxxp:// dot cashshowtime dot com/
Don't want give him backlink....lol

Get code here(not mine):
Code:
http://www.maxmind.com/app/javascript_city
Thanks so much...
Reference URL's