Lets say I have domain http://domain.ru and a English visitor visits, it shows me English website based on IP sent him to /eng/ but If a Russian user went on send that person to /ru/
Instead of a User selecting an address I would like to filter only Russia and other countries, meaning that even if your in France you shall visit /eng/ but IF you are in Russia you visit /ru/
Any tips to do this? Or Recommendations?
You can get IP address of incoming request using $_SERVER['REMOTE_ADDR']
. See this and this questions on how to map your IP address to a country.
There are several free SQL database with IP mapping here. They also have API.
IP addresses are not assigned in blocks to countries, so there is no easy way to do this. The best solution i've used is a third party database of IPs from a company called MaxMind - they have an open source version of the database at http://www.maxmind.com/en/opensource and there are many tutorials online for integrating this with a PHP application.
You can user thrid party integration. There is a third party service, that detects country based upon user IP