mirror of
https://github.com/slawkens/myaac.git
synced 2025-06-10 23:04:30 +02:00
Set default_socket_timeout for ipinfo.io checkup
This commit is contained in:
parent
b2c9eb4745
commit
e09fe51774
@ -302,7 +302,9 @@ if($config['account_country_recognize']) {
|
||||
$country_recognized = $country_session;
|
||||
}
|
||||
else {
|
||||
$info = json_decode(@file_get_contents('http://ipinfo.io/' . get_browser_real_ip() . '/geo'), true);
|
||||
ini_set('default_socket_timeout', 5);
|
||||
|
||||
$info = json_decode(@file_get_contents('https://ipinfo.io/' . get_browser_real_ip() . '/geo'), true);
|
||||
if(isset($info['country'])) {
|
||||
$country_recognized = strtolower($info['country']);
|
||||
setSession('country', $country_recognized);
|
||||
|
Loading…
x
Reference in New Issue
Block a user