User Country detection


#1

How can i know user country?


#2

https://puravidaapps.com/tools.php


#3

I test with this. It shows my country is US. But I am in Bangladesh


#4

Use network ip component and then you can find ip location with the help of whatsmyip okkk


#5

see the documentation https://puravidaapps.com/tools.php

country
Returns the country/region code of the current Locale, which should either be the empty string, an uppercase ISO 3166 2-letter code, or a UN M.49 3-digit code.
A Locale object represents a specific geographical, political, or cultural region.

you also can try the telephony manager extension and its SimCountryIsoCode or CountryIsoCode method

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.


#6

You can use the same code I posted here: How to get IP address

Just select index 2 instead of 1 :slight_smile:


#7

Will you please provide some blocks. Which component you are saying about


#8

read this article properly…


#9

i can find those blocks