I have a site currently hosted on another server located in another country. I just want to create a mirror site and host it on an US server. But I want to use the same domain. So customers will be accessing the same web URL mysite.com, but it direct to US server or foreign server depend on visitor's location. How can this be done? What kind of technology is behind this?

Please advice.