Eros eros Posted October 2, 2024 Share Posted October 2, 2024 Hi, is it possible to know the country of origin of a user who arrives on my website? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted October 3, 2024 Share Posted October 3, 2024 Hi, Yes, it's possible to detect the country of origin of a user visiting your website. You can integrate MaxMind (GeoIP2) library with PrestaShop to automatically detect the user's country. You can use the server's ability to detect the visitor's IP address and pass it through a custom-built solution that uses an IP database (such as MaxMind GeoLite) to determine the country. $ip = $_SERVER['REMOTE_ADDR']; // Get user's IP address $country = geoip_country_name_by_name($ip); // Use GeoIP or a similar service to get the country echo $country; Regards. Link to comment Share on other sites More sharing options...
Eros eros Posted October 3, 2024 Author Share Posted October 3, 2024 Thank you, perhaps useless question.... there is no way to do something similar on the CSS side Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now