PDA

View Full Version : redirect based upon users country


moneymental
09-13-2001, 08:49 AM
Hi is it possible to redirect a page based on the users country?

i.e. if someone from england goes to www.site.com
then the script will see they have come from england and points them to the address www.site.com/england/


is it possible huh huh?

thanks in advance
moneymental

scoutt
09-13-2001, 01:36 PM
you can use this script as it sound it is like what you want.

http://www.a1javascripts.com/redirection_scripts/redirectonlang/english.html

cloud9
09-13-2001, 02:07 PM
Originally posted by scoutt
you can use this script as it sound it is like what you want.

http://www.a1javascripts.com/redirection_scripts/redirectonlang/english.html

I think he means by country, not language. To do this you will have to do a reverse DNS of the user's IP and grab the country code and then do the redirect, perl will do this.

scoutt
09-13-2001, 04:39 PM
that is true cloud, didn't think of that. :)

I just saw country then automatically thought language.

moneymental
09-14-2001, 04:31 AM
Thanks yes I do need it to work by country not language

do you know any pre-made scripts that would do it or how I would go about it?

I'm not the best coder in the world.

Thanks in advance

cloud9
09-14-2001, 01:10 PM
here is the link:

http://www.hotscripts.com/Perl/Scripts_and_Programs/Redirection/Hostname_Based/


hope this helps

:D


Originally posted by moneymental
Thanks yes I do need it to work by country not language

do you know any pre-made scripts that would do it or how I would go about it?

I'm not the best coder in the world.

Thanks in advance