From 783d96fc6568a607d3198b832fed3a0dd06c4ebb Mon Sep 17 00:00:00 2001 From: slawkens Date: Fri, 20 Dec 2024 22:42:35 +0100 Subject: [PATCH 1/2] Set default_socket_timeout for ipinfo.io checkup --- system/pages/account/create.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/pages/account/create.php b/system/pages/account/create.php index af427d37d..42749a44e 100644 --- a/system/pages/account/create.php +++ b/system/pages/account/create.php @@ -331,6 +331,8 @@ $country_recognized = $country_session; } else { + ini_set('default_socket_timeout', 5); + $info = json_decode(@file_get_contents('http://ipinfo.io/' . get_browser_real_ip() . '/geo'), true); if(isset($info['country'])) { $country_recognized = strtolower($info['country']); From da1816cc1319862b1a706f05e545ae7d4a8c75ad Mon Sep 17 00:00:00 2001 From: slawkens Date: Fri, 20 Dec 2024 22:42:46 +0100 Subject: [PATCH 2/2] use https --- system/pages/account/create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/pages/account/create.php b/system/pages/account/create.php index 42749a44e..1c8f1e9fd 100644 --- a/system/pages/account/create.php +++ b/system/pages/account/create.php @@ -333,7 +333,7 @@ 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('https://ipinfo.io/' . get_browser_real_ip() . '/geo'), true); if(isset($info['country'])) { $country_recognized = strtolower($info['country']); setSession('country', $country_recognized);