country($ip); return $record->country->isoCode;*/ } function getcity($ip, $locale) { /*$reader = new Reader(__DIR__ . '/GeoLite2-City.mmdb'); if ($ip === '::1' || $ip === '127.0.0.1') $ip = '212.252.139.162'; //for debugging $record = $reader->city($ip); if (array_key_exists($locale, $record->city->names)) return $record->city->names[$locale]; else return $record->city->name;*/ } function getisp($ip) { /*$reader = new Reader(__DIR__ . '/GeoLite2-ASN.mmdb'); if ($ip === '::1' || $ip === '127.0.0.1') $ip = '212.252.139.162'; //for debugging try { $record = $reader->asn($ip); return $record->autonomousSystemOrganization; } catch (GeoIp2\Exception\AddressNotFoundException $e) { return 'UNKNOWN'; }*/ }