Does anyone know of a way to load a page ONLY if the visitor IP is from a specified country? If not, the visitor should be redirected to the right country page. I'm looking to do this in PHP if possible.
Eg. If visitor IP is showing UK, the page loads. Otherwise, they are redirected depending on their IP; if it's a US IP address, they are redirected to the US webpage; if it's a CA IP address, they are redirected to the Canadian webpage.
Note:
1) I know this method may not always be accurate since the visitor may be accessing via VPN/proxies, but it's still the preferred method so appreciate any help on this.
2) The alternative to the above example is of course to simply redirect all visitors depending on their IPs. But I am specifically looking to load a page and not redirect a visitor if they are from a specified country. Thanks for your help in advance!
3) I already know how to redirect visitors based on IP address. That's not the part I'm having trouble with. It's the part on "load THIS page if IP address is from a specified country". Apologies for any confusion!