• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 468
  • Last Modified:

geo ip traffic

hello,
is there any tool out there that can redirect traffic from countries to a different page?
lets say my website is domain.com and if a country goes to my page redirect it to
domain.com/english.php or maybe a german country domain.com/german.php
is this possible ?
0
Sabrin
Asked:
Sabrin
1 Solution
 
HuyBDCommented:
As I know, It is depend on the client IP to specify the country
You can get client IP by $_SERVER["HTTP_CLIENT_IP"],$proxy = $_SERVER["REMOTE_ADDR"]
0
 
HackneyCabCommented:
It is not recommended to redirect users to different pages based on IP address (or IP-based country deductions).

If you want to serve different pages to people of different languages, then look at Apaches content negotiation modules.

If you want to serve different adverts to people from different countries (which is what I do) then take a look at maxmind.com who offer a free GeoIP database by country (which claims 97% accuracy, but does not work for AOL users). They also offer a premium database that claims to resolve IP addresses to city level, but I've never tried this. Their site gives example usage in several web languages, including PHP.

But I urge you not to create a single URL for multiple content versions. This will probably annoy search engines, which may think you're trying to trick them into indexing your page with certain keywords that don't appear in the standard version of the page.

If you're trying to appeal to multiple markets, offer a main .com page that has a country selector at the top, and then allow country choice to redirect the user to the sutiable domain or directory. (I believe that SEO experts recommend that you use .uk domains for sites aimed at the UK, .fr domains for sites aimed at France, etc.)
0
 
Bolter99Commented:
<?
echo $_SERVER['HTTP_ACCEPT_LANGUAGE'];
?>

Maybe that could help?
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now