Skip to content

Commit e09fe51

Browse files
committed
Set default_socket_timeout for ipinfo.io checkup
1 parent b2c9eb4 commit e09fe51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

system/pages/createaccount.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,9 @@
302302
$country_recognized = $country_session;
303303
}
304304
else {
305-
$info = json_decode(@file_get_contents('http://ipinfo.io/' . get_browser_real_ip() . '/geo'), true);
305+
ini_set('default_socket_timeout', 5);
306+
307+
$info = json_decode(@file_get_contents('https://ipinfo.io/' . get_browser_real_ip() . '/geo'), true);
306308
if(isset($info['country'])) {
307309
$country_recognized = strtolower($info['country']);
308310
setSession('country', $country_recognized);

0 commit comments

Comments
 (0)