From e09fe517747e4f462c72395ede39759bf308d171 Mon Sep 17 00:00:00 2001 From: slawkens Date: Thu, 26 Dec 2024 08:53:40 +0100 Subject: [PATCH] Set default_socket_timeout for ipinfo.io checkup --- system/pages/createaccount.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/pages/createaccount.php b/system/pages/createaccount.php index 8a75cbe5f..f16ed753c 100644 --- a/system/pages/createaccount.php +++ b/system/pages/createaccount.php @@ -302,7 +302,9 @@ $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);