Reputation: 5042
There is a website that support shops information like food,drink,golf,spa. This websites provide information on Thailand, Hongkong, Singapore and Cambodia. If a user from Thailand connect this website. The default menu will be set to Thailand. If a user from Hongkong use this website. We will set default menu to Hongkong. If a user from others country that is not in the list. the default will be set to Thailand.
What is the best way to do this.
Upvotes: 0
Views: 4997
Reputation: 148110
You can get the location of incoming request by the following service. Which will give you country and city.
http://api.hostip.info/get_html.php?ip=207.46.197.32
There is a open source which will do the same for you, please have a look here
If you need more then visit here
Upvotes: 2
Reputation: 10871
I use Google Loader https://developers.google.com/loader/.
Similiar question here on SO. The accepted answer even has an example page.
Upvotes: 2