?
Solved

geo ip traffic

Posted on 2006-10-30
3
Medium Priority
?
457 Views
Last Modified: 2008-01-09
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
Comment
Question by:Sabrin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 17

Expert Comment

by:HuyBD
ID: 17840209
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
 
LVL 16

Accepted Solution

by:
HackneyCab earned 2000 total points
ID: 17841167
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
 
LVL 1

Expert Comment

by:Bolter99
ID: 17853615
<?
echo $_SERVER['HTTP_ACCEPT_LANGUAGE'];
?>

Maybe that could help?
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question