Raised This Month: $51 Target: $400
 12% 

GeoIP doesn't determine the city from which the player connects to the server.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 10-11-2022 , 19:13   GeoIP doesn't determine the city from which the player connects to the server.
Reply With Quote #1

Last time I have a problem with GeoIP2 (included in latest stable SM 1.11 build).

It worked about 1-2 month ago, but at this time i get a <""> result after using GeoipCity function.

If someone knows, tell me, maybe I initially did something wrong. My code:
PHP Code:
char ip[64], country[4], city[128];
GetClientIP(clientipsizeof(ip), true);
GeoipCode3(ipcountry);
GeoipCity(ipcitysizeof(city), -1);
CPrintToChatAllEx(client"Player {teamcolor}%N{default} ({olive}%s{default}, {olive}%s{default}) has connected to server."clientcountrycity); 
An interesting fact is that the country is defined correctly, but the city is not defined at all. The GeoLite2-City.mmdb file version is used from SourceMod 1.11 build 6911

Thanks!
BRU7US is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-11-2022 , 23:09   Re: GeoIP doesn't determine the city from which the player connects to the server.
Reply With Quote #2

You need update geoip database monthly.
You know, IP's are dynamic, those change all the time.

https://dev.maxmind.com/geoip/geolit...n-data?lang=en
__________________
Do not Private Message @me
Bacardi is offline
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 10-12-2022 , 13:27   Re: GeoIP doesn't determine the city from which the player connects to the server.
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
You need update geoip database monthly.
You know, IP's are dynamic, those change all the time.

https://dev.maxmind.com/geoip/geolit...n-data?lang=en
Thanks for help. I have found an actual version of database here and it works!

Last edited by BRU7US; 10-12-2022 at 13:28.
BRU7US is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode