I've been learning PHP for a little while, working with it maybe 2 weeks now, making a new site, just came upon a bit of a problem, would be most grateful if anyone can help out.
I'm trying to find a way to write a function, or somehow check, and find out what country a user is in, from their IP address, if possible, or any way really.
(The site is multi-language, and it would be nice to be able to redirect them to the most obvious choice based on their location. If it's any help, at the moment I have a cookie that records their choice the first time they visit, and sends them to that one each time after)
Thanks!