I have enabled cloudflare in my website. Now I want to get the visitors country.
I am using this code $_SERVER["HTTP_CF_IPCOUNTRY"]
to get current user country. It is returning the correct country in Desktop
devices. But it is not returning the correct country on Mobile. I cannot understand how it is possible. It is always returning the Cloudflare enabled country when browse from the mobile.
Any suggestion highly appreciated. I looked into this question already and took the current code from it. But no worth for mobile devices.
Thanks in advance