php redirection based on IP location

andehlu

this modern love
has anyone done this before? Example Im making localized sites for some countries in europe. id like to be able to redirect the users based on the location of thier IP. If you have, which scripts/database service have you used for this?
 
...unfortunately I don't have access to the magazine at the moment, so I can't give you any hints to the content right now.

However, I do know that Alstrasoft has a product called "AlstraSoft Geo Redirect Pro", that is based on PHP and MySQL. It'll cost you $50 for a years license and should do the trick.
 
thanks elander ill look into it. I also found this free one from hot scripts which seems to be good for free. They say its 75% effective, for free thats not bad.

http://www.enterthechapel.com/rv/exemple.php

But its cookie based which is kind of annoying. Can anyone who reads this post try the url above and tell me if it picks up which country you are from? It did not work for a few ppl that I know and I am not 100% sure why, maybe isp based maybe a problem with the cookie.
 
...they used stuff from MaxMind (www.maxmind.com). They have a bunch of really neat libraries at pretty reasonable prices. Theres even one that will tell you the city, along with country and region/county, and give you an estimation of the citys population...

You should probably check it out.

BTW: I'm not affiliated with, nor do I have any financial ties to MaxMind. Just liked the stuff...
 
Why don't you simply create multiple index pages like index.html.en and index.html.de and let the webserver do the job automaticly?

Every good browser can be set to your prefered language in the settings and send this information included in the http headers. Than any good server like Apache fetch the correct language file. And you can add .en or .ch ... to every file and create multiple versions.

Why try to use a script if the browser and server has it build in much better. For example my prefered language for websites is english (most times more infos in this language) so if you use a php script you will send me a german version I didn't want ;)
 
andehlu said:
They say its 75% effective, for free thats not bad.

Heh i guess i hit the 25%: ;)

Here are the country details as loaded into $rv_cinfo :
Country Code: HK
Country Name: Hong Kong (SAR)
Country Capital: Hong Kong
Region: Southeast Asia
Currency: Hong Kong Dollar
Currency Code: HKD
Population: 0
 
Back
Top