Notes to IpToCountry services

Discussions about Servers
User avatar
Sp0ngeb0b
Adept
Posts: 370
Joined: Wed Feb 13, 2008 9:16 pm
Location: Cologne

Re: Notes to IpToCountry services

Post by Sp0ngeb0b » Thu Mar 26, 2020 1:36 pm

I assume you mean wrong countries being displayed with 'fake results'? This is caused by the SQL database not being up to date, not a fault of Ip2Country. I personally don't maintain an Ip2Country database server, but I rarely have any issues with the public ones provided by community members.
However, I maintain the country assignment database of my UTStats database, and have recently adjusted UTStats to utilize the free GeoLite2 files which are updated weekly. They provide IP to Country data either in binary format (.mmdb) or as human-readable in .csv. The binary file is processed via a provided php script and accessed from UTStats' php files.

Regarding Ip2Country: Using an external SQL database has the clear advantage of not straining the gameserver with the lookup process. The latest csv file contains about 300k entries so I don't see any promising way to perform lookups in UScript. I do agree that the additional communication with the Ip2Country DB server is not necessarily required if you are able to process the data directly on the gameserver. This would require a native mod though I suppose.
Website, Forum & UTStats

Image
******************************************************************************
Nexgen Server Controller || My plugins & mods on GitHub
******************************************************************************

User avatar
sektor2111
Godlike
Posts: 5065
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Notes to IpToCountry services

Post by sektor2111 » Thu Mar 26, 2020 5:50 pm

Note: Database computed previously looks incomplete - lol services so I went to gain other resources for 2020.
These newer calculations looks more optimized and I think I'll try some lousy conversion of old mutator trying to keep original integrity but operating a local query instead the old one VIA network. A state code probably can simulate a Web communication smoothly looking around an array having 212.513 lines and returning similar results. I only have to see how much breaking I need in order to prevent iterations boundary but maintaining a quicker response as possible. XC_Engine is capable to deal with dynamic arrays and here I only need to figure a solution for porting code into a similar local format, or... a fixed array attached to an actor could be another way instead of using Network Channels.

Edit: I went to do a research because Not a single time a player has asked something another one and... it was confusing, no answer because Country was WRONG reported ("I don't understand your language"), so these services must be updated. I figured one player reported as being from my country having a ping which was surprising to me, and later I could figure his address as being from UK, LOL, not even closer from me.
Sample from "INI" which will have a dynamic array deal:

Code: Select all

Country=220.158.148.0-220.158.151.255:Cambodia:KHM:KH
Country=221.120.160.0-221.120.163.255:Cambodia:KHM:KH
Country=223.223.168.0-223.223.175.255:Cambodia:KHM:KH
Country=41.77.80.0-41.77.87.255:Cameroon:CMR:CM
Country=41.77.208.0-41.77.215.255:Cameroon:CMR:CM
Country=41.78.204.0-41.78.207.255:Cameroon:CMR:CM
And so on for the rest...

User avatar
asosed
Experienced
Posts: 95
Joined: Fri May 15, 2020 2:36 pm
Location: Russia

Re: Notes to IpToCountry services

Post by asosed » Fri Jun 05, 2020 10:14 am

Hey. Serbian flag not displayed.
The country is determined by this service:
http://forum.gameclan.pl/iptocountry/in ... 48.172.123
I am using CountryFlags2.utx. Maybe this flag is missing there?

UPD: Serbian flag is missing in CountryFlags2.utx
I will try CountryFlags3.utx
You do not have the required permissions to view the files attached to this post.
Image
Image

User avatar
Sp0ngeb0b
Adept
Posts: 370
Joined: Wed Feb 13, 2008 9:16 pm
Location: Cologne

Re: Notes to IpToCountry services

Post by Sp0ngeb0b » Fri Jun 05, 2020 1:29 pm

asosed wrote:
Fri Jun 05, 2020 10:14 am
I will try CountryFlags3.utx
I did the exact same thing and used CountryFlags3.utx which was released in XBrowser 200. However, players on my server reported a version missmatch with this file. So you may want to be careful, there might be a different version floating around as well.
Website, Forum & UTStats

Image
******************************************************************************
Nexgen Server Controller || My plugins & mods on GitHub
******************************************************************************

User avatar
asosed
Experienced
Posts: 95
Joined: Fri May 15, 2020 2:36 pm
Location: Russia

Re: Notes to IpToCountry services

Post by asosed » Fri Jun 05, 2020 3:27 pm

Sp0ngeb0b wrote:
Fri Jun 05, 2020 1:29 pm
asosed wrote:
Fri Jun 05, 2020 10:14 am
I will try CountryFlags3.utx
I did the exact same thing and used CountryFlags3.utx which was released in XBrowser 200. However, players on my server reported a version missmatch with this file. So you may want to be careful, there might be a different version floating around as well.
I already noticed that. Due to this version mismatch, it is not allowed to the server.I renamed the file on the server the CountryFlags3.utx file to CountryFlags3_v2.utx and it worked
Image
Image

User avatar
shoq_jedi
Novice
Posts: 8
Joined: Sun Nov 03, 2019 3:08 am
Personal rank: Jedi Master
Location: DavidM2

Re: Notes to IpToCountry services

Post by shoq_jedi » Wed Aug 19, 2020 11:32 am

I've tried everything. Over and over again. No idea what is wrong. My best guess is that maybe my game server host in blocking something outgoing from the server to http://ip2c.xantaz.net/?ip=8.8.8.8
ImageImage

User avatar
Barbie
Godlike
Posts: 2016
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Notes to IpToCountry services

Post by Barbie » Wed Aug 19, 2020 9:04 pm

shoq_jedi wrote:
Wed Aug 19, 2020 11:32 am
I've tried everything. Over and over again. No idea what is wrong. My best guess is that maybe my game server host in blocking something outgoing from the server to http://ip2c.xantaz.net/?ip=8.8.8.8
If I use Firefox and follow the link you have given it shows that the IpToCountry service is working (19 Aug 2020 22:00 MEST):
ip2c.xantaz.jpg
What happens if you follow the link with your browser?
You do not have the required permissions to view the files attached to this post.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
shoq_jedi
Novice
Posts: 8
Joined: Sun Nov 03, 2019 3:08 am
Personal rank: Jedi Master
Location: DavidM2

Re: Notes to IpToCountry services

Post by shoq_jedi » Wed Aug 19, 2020 9:22 pm

The same thing. The webserver & service appear to be working fine as you have confirmed. It must be on the game server side. They are not on the same server as I am using https://www.nfoservers.com/ for both my game and web servers. The only other thing I can think is that it could be and issue with https://dash.cloudflare.com/login, which I use for increased security.

Here are my settings

[IpToCountry.LinkActor]
;viewtopic.php?f=33&t=11568
QueryServerHost[0]=ip2c.xantaz.net
QueryServerHost[2]=ip2c.xantaz.net:80
QueryServerHost[3]=ip2c.xantaz.net
QueryServerFilePath[0]=/index.php
QueryServerFilePath[1]=/index.php
QueryServerFilePath[2]=/iptocountry16.php
QueryServerFilePath[3]=index.php
QueryServerPort[0]=80
QueryServerPort[1]=80
QueryServerPort[2]=80
QueryServerPort[3]=80
resolvedAddress[0]=104.27.166.19
resolvedAddress[1]=34.98.99.30
resolvedAddress[2]=104.24.102.120
resolvedAddress[3]=104.24.102.120
MaxTimeout=10
ErrorLimit=5
bNeverPurgeAddress=False
bSpawnAddon=True
IPData[0]=.....
....
....
IPDataIndex=0
QueryServerHost[1]=www.ut-slv.com
ImageImage