mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Set default_socket_timeout for ipinfo.io checkup
This commit is contained in:
parent
988a3f2dbe
commit
783d96fc65
@ -331,6 +331,8 @@ if(setting('core.account_country_recognize')) {
|
|||||||
$country_recognized = $country_session;
|
$country_recognized = $country_session;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
ini_set('default_socket_timeout', 5);
|
||||||
|
|
||||||
$info = json_decode(@file_get_contents('http://ipinfo.io/' . get_browser_real_ip() . '/geo'), true);
|
$info = json_decode(@file_get_contents('http://ipinfo.io/' . get_browser_real_ip() . '/geo'), true);
|
||||||
if(isset($info['country'])) {
|
if(isset($info['country'])) {
|
||||||
$country_recognized = strtolower($info['country']);
|
$country_recognized = strtolower($info['country']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user