mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-13 17:24:54 +02:00
Prefer get_browser_real_ip() over REMOTE_ADDR
This commit is contained in:
@@ -331,7 +331,7 @@ if(setting('core.account_country_recognize')) {
|
||||
$country_recognized = $country_session;
|
||||
}
|
||||
else {
|
||||
$info = json_decode(@file_get_contents('http://ipinfo.io/' . $_SERVER['REMOTE_ADDR'] . '/geo'), true);
|
||||
$info = json_decode(@file_get_contents('http://ipinfo.io/' . get_browser_real_ip() . '/geo'), true);
|
||||
if(isset($info['country'])) {
|
||||
$country_recognized = strtolower($info['country']);
|
||||
setSession('country', $country_recognized);
|
||||
|
Reference in New Issue
Block a user