Link to home
Start Free TrialLog in
Avatar of bangers3474
bangers3474

asked on

change content by visitors ip or geographical location

Hi I like to achieve something like this:
http://www.sonyericsson.com though much simpler.

When you arrive at the homepage you are given a list of countries to select, though the country you are in is already selected as the default. You could change it if you require to see a site specific to another country but you also have an option to save your country of choice as your preferred option for when you return to the site (a cookie I presume).

I'd like to do the same but far simpler as it is to direct users of a shop to either a us site if resident of us/canada or to an eu site if a memeber of the eu such as a user in the uk.

So I guess what I'm asking for is a script that will understand where a user has come from and change a section of the page to be visible or not based on the result. So show eu flag for eu users or us flag for us users. Also for there to be an option to save the users preference.

I would like this to be achived using php or javascript or at least something that will happily work on a linux/unix server.

Any thoughts?
Regards
Bangers
ASKER CERTIFIED SOLUTION
Avatar of Joe Wu
Joe Wu
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Seems its not free though...I will see if I can find a free alternative!
Seems this one is free and 75% accurate:
http://www.v7n.com/scripts/php/redirection/details500.php

Hope this helps!
hmmm but then I think the download link for that died!

Here is a few more FYI:
http://software77.net/cgi-bin/ip-country/geo-ip.pl

But in general, what you are trying to do I think will require a IP database, and that generally requires a subscription or costs unfortunately.

Seems like there isn't many free alternatives!
Avatar of bangers3474
bangers3474

ASKER

thanks for the help nizmo,
Has anyone got a free alternative, I thought this would be resaonably easy to sort out?
Thanks
Bangers
I'd create a Database using ip2nation for example http://www.ip2nation.com/ or collect all info from all the registrars, but that would take some time.

On ip2nation site you will find a free mysql file and some sample scripts.

Why did you accept an answer as a solution if you said that did not work? and this after my last comment?
People like you bangers3474 make experts-exchange a untidy and unclean database, googd luck with your poor behaviour.
Hey I accepted before seeing your comment was posted. As you'd be able to see from other questions I have opened up I have always accepted answers promptly and as I felt this was the only answer I was going to have I accepted it. If there is a way of sorting it out I'd be happy to do so but frankly your attitude stinks and you shouldn't be so quick to pass judgement before you get a reply.
@administradores you said "Why did you accept an answer as a solution if you said that did not work?" in what part of bangers3474 reply said my solution did not work? Sure it wasn't free....but it works, bangers3474 was just asking for a free alternative.