Prefer get_browser_real_ip() over REMOTE_ADDR

This commit is contained in:
slawkens
2024-09-08 05:36:33 +02:00
parent 71ef30d35e
commit b5bbae62b0
6 changed files with 8 additions and 8 deletions

View File

@@ -294,7 +294,7 @@ if($config['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);