PDA

View Full Version : [News] IpToCountry masterserver update 21/08/2007


AnthraX
21st August, 2007, 11:39 AM
I've uploaded a new IpToCountry script to the utgl server. It uses the latest GeoLite resolving database (in binary format). Resolving should go faster and should be more accurate now. People who want to use the new resolver should change the "ConfQueryServers[0]=" line in their server's IpToCountry.ini file so that it reads "ConfQueryServers[0]=85.236.100.16,utgl.unrealadmin.org/iptocountry13.php".

For admins using their own masterserver, you can grab a copy of the updated database and script here: http://utgl.unrealadmin.org/IpToCountry/IpToCountry-Masterserver-20070821.zip

I don't have a public server to do extensive testing so if any problem occurs, let me know in this thread.

sphx
21st August, 2007, 01:00 PM
cool, I'll update my host too, thanks!

SoNY_scarface
21st August, 2007, 01:42 PM
how do i go about hosting this myself?

AnthraX
21st August, 2007, 02:11 PM
how do i go about hosting this myself?

You will need:
1) A webserver with php support
2) The hostname of that webserver (eg: www.somewebserver.net)
3) The path to your iptocountry13.php script (eg: /IpToCountry/iptocountry13.php)
4) The IP of your webserver (eg: 85.236.100.16)

If you have all those things, you can simply decompress the masterserver zip file to some folder on your webserver. Then you can edit your UT server's IpToCountry.ini file and adjust the ConfQueryServers[0]= line.

This line should read ConfQueryServers[0]=<IP of the webserver>,<hostname of the webserver>/<path to your script>. In my example it would be ConfQueryServers[0]=85.236.100.16,www.somewebserver.net/IpToCountry/iptocountry13.php
PS: It might be useful to test your script after you've decompressed it. You should open your browser and go to http://<hostname of the webserver>/<path to your script>?ip=62.212.83.150,82.133.85.65 (this would be http://www.somewebserver.net/IpToCountry/iptocountry13.php?ip=62.212.83.150,82.133.85.65 in my example). If the return is something like "14:03 62.212.83.150:www.gameservers.net:NETHERLANDS:NLD:nl,82.133.85.65:secure.jolt.co.uk:UNITED KINGDOM:GBR:gb" then the script is working.

SoNY_scarface
21st August, 2007, 03:15 PM
hosting this myself would it be faster? reduce lag? what are the benefits?

XEvilWyvernX
21st August, 2007, 04:23 PM
What are the php setting requirement Ive tried doing on a domain with a shared ip and a dedicated ip. console is showing failed to bind to port. are there any specifc ports that will need to be opened on the webhosting end

oofki1
21st August, 2007, 05:44 PM
Probably port 80 for http traffic and port 21 for FTP traffic if it uses ftp.

[BSC]MasterJohnny
21st August, 2007, 05:56 PM
Nice, thanks Anthrax. Can you please give some further instructions how to keep it up-to-date?

Edit:
It says:
IpToCountry: my.host.here returned bad data! Switching to alternate.

After typing the line that you sad, it returns:

18:00 82.141.171.36:82.141.171.36:HUNGARY:HUN:hu

I think the first '18:00' is what causes the problem.

AnthraX
21st August, 2007, 06:04 PM
MasterJohnny;128172']Nice, thanks Anthrax. Can you please give some further instructions how to keep it up-to-date?

well, IpToCountry uses the GeoLite database and scripts which you can find here: http://www.maxmind.com/app/geoip_country

The problem is that the maxmind people have changed their database format a few times so I had to rewrite the script. As long as they keep the database in the same binary format, you can just replace the GeoIP.dat file whenever it gets updated.

MasterJohnny;128172']It says:
IpToCountry: my.host.here returned bad data! Switching to alternate.

After typing the line that you sad, it returns:

18:00 82.141.171.36:82.141.171.36:HUNGARY:HUN:hu

I think the first '18:00' is what causes the problem.

Are you running the 1.2 version of the IpToCountry actor? The original 1.2 php script returns the exact same return so I don't see a problem.

[BSC]MasterJohnny
21st August, 2007, 06:34 PM
Strange, they do give the same output:

http://hsc-clan.hu/ipnew/iptocountry13.php?ip=87.194.9.193
http://hsc-clan.hu/masterserver/iptocountry12.php?ip=87.194.9.193

But the first one says:
IpToCountry: hsc-clan.hu returned bad data! Switching to alternate.

While the second one resolves and gives a good return.

I use IpToCountry-1.2-v3

AnthraX
21st August, 2007, 07:18 PM
Strange, I guess this is because of the way UT parses HTTP headers (I've been comparing sniffed packets a bit and the returns are slightly different on ethernet level). Could you replace your IpToCountry actor by this file: http://utgl.unrealadmin.org/IpToCountry/IpToCountry.u

Then add bAnthDebug=true to your IpToCountry.ini file. This should shed some light on the differences between the two returns.

[BSC]MasterJohnny
21st August, 2007, 07:28 PM
Possessed PlayerPawn: EUTFemale1 CTF-andACTION-VIII.EUTFemale0
2007-08-21 19:42.40 [BSC]MasterJohnny....Client Connected [IP] 82.141.171.36
DEBUG -> Requesting host: 82.141.171.36 -> return: !Added to queue
BDBMapVote: Maps Reloaded. Total Maps = 628
2007-08-21 19:42.40 [BSC]MasterJohnny [IP] 82.141.171.36 [Client MouseY] Axis aMouseY Speed=6.0
2007-08-21 19:42.40 [BSC]MasterJohnny [IP] 82.141.171.36 [Client MouseX] Axis aMouseX Speed=6.0
2007-08-21 19:42.46 [BSC]MasterJohnny [IP] 82.141.171.36 [MMI] UDEMO.UDMODITEM
2007-08-21 19:42.46 [BSC]MasterJohnny [IP] 82.141.171.36 [MMI] SPECFIX.SPECITEM
DEBUG -> Requesting host: 82.141.171.36 -> return: !Resolving now
DEBUG -> Requesting host: 82.141.171.36 -> return: !Resolving now
OPBan: Watcher 0 checking IPPolicy for 82.141.171.36:61111
OPBan: Shutting down watcher 0 after 1 seconds
DEBUG -> Requesting host: 82.141.171.36 -> return: !Resolving now
DEBUG -> Requesting host: 82.141.171.36 -> return: !Resolving now
DEBUG -> got HTTP data: 32
19:25 153.19.20.10:syzyf.ids.gda.pl:POLAND:POL:pl,
31
153.19.48.15:knot815.eti.pg.gda.pl:POLAND:POL:pl,
2a
82.141.171.36:82.141.171.36:HUNGARY:HUN:hu
0


DEBUG -> Requesting host: 82.141.171.36 -> return: !Added to queue
### -------------------------------------------------------------
### ANTHCHECKER - PLAYER JOIN
### -------------------------------------------------------------
### - Player name : [BSC]MasterJohnny
### - Player IP : 82.141.171.36
### - Player OS : Windows
### - EngineVer : 436
### - RenderDev : Direct3D D3D8Drv.dll
### - RenderVer : UTGLR v1.3 D3D8 Renderer
### - RenderChksm : 2FFE63AFD1124346F12A705C77EBE2A2
### - RenderSize : 229376 bytes
### - TimeStamp : 21-08-2007 19:42:48
### -------------------------------------------------------------
DEBUG -> Requesting host: 82.141.171.36 -> return: !Resolving now
[ASC] Login: [BSC]MasterJohnny - ID: 5E9F76AADE574E6D059372D3316DFE99 - IP: 82.141.171.36
DEBUG -> Requesting host: 82.141.171.36 -> return: !Resolving now
DEBUG -> got HTTP data: 6
19:25
2a
82.141.171.36:82.141.171.36:HUNGARY:HUN:hu
0


IpToCountry: hsc-clan.hu returned bad data! Switching to alternate.
DEBUG -> Requesting host: 82.141.171.36 -> return: !Resolving now
DEBUG -> Requesting host: 82.141.171.36 -> return: !Resolving now
DEBUG -> Requesting host: 82.141.171.36 -> return: !Resolving now
DEBUG -> got HTTP data: 30
19:25 82.141.171.36:82.141.171.36:HUNGARY:HUN:hu
0


DEBUG -> Requesting host: 82.141.171.36 -> return: 82.141.171.36:82.141.171.36:HUNGARY:HUN:hu
[Hostname Ban] New Player: [BSC]MasterJohnny - 82.141.171.36 - 82.141.171.36
[Hostname Ban] [BSC]MasterJohnny - Login Accepted
DEBUG -> Requesting host: 82.141.171.36 -> return: 82.141.171.36:82.141.171.36:HUNGARY:HUN:hu
MvReporter2: Switching state to 'LoggedIn'
MvReporter2: Joining Channel: #hsc.rep2
MvReporter2: Successfully logged in to IRC Network!

No clue what these 2 ips are:

153.19.20.10:syzyf.ids.gda.pl:POLAND:POL:pl,
153.19.48.15:knot815.eti.pg.gda.pl:POLAND:POL:pl,
I only tested myself.

AnthraX
21st August, 2007, 07:32 PM
MasterJohnny;128180']
No clue what these 2 ips are:

153.19.20.10:syzyf.ids.gda.pl:POLAND:POL:pl,
153.19.48.15:knot815.eti.pg.gda.pl:POLAND:POL:pl,
I only tested myself.

I wouldn't worry about those, they're some sort of selfcheck :) Have you tried to use the iptocountry13.php script on utgl.unrealadmin.org by the way?

[BSC]MasterJohnny
21st August, 2007, 07:32 PM
P.S. my host has no reverse lookup configured.
Here's another:
Login: ~*h$c*~Miska
OPBan: Watcher 2 starting
Possessed PlayerPawn: EUTFemale2 CTF-andACTION-VIII.EUTFemale2
2007-08-21 19:48.29 ~*h$c*~Miska....Client Connected [IP] 86.101.218.166
DEBUG -> Requesting host: 86.101.218.166 -> return: !Added to queue
DEBUG -> Requesting host: 86.101.218.166 -> return: !Resolving now
DEBUG -> Requesting host: 86.101.218.166 -> return: !Resolving now
OPBan: Watcher 2 checking IPPolicy for 86.101.218.166:1708
OPBan: Shutting down watcher 2 after 1 seconds
DEBUG -> got HTTP data: 6
19:30
3d
86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
0


IpToCountry: hsc-clan.hu returned bad data! Switching to alternate.
DEBUG -> got HTTP data: 6
19:30
3d
86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
0


IpToCountry: hsc-clan.hu returned bad data! Switching to alternate.
DEBUG -> got HTTP data: 6
19:30
3d
86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
0


IpToCountry: hsc-clan.hu returned bad data! Switching to alternate.
DEBUG -> Requesting host: 86.101.218.166 -> return: !Resolving now
DEBUG -> got HTTP data: 6
19:30
3d
86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
0


IpToCountry: hsc-clan.hu returned bad data! Switching to alternate.
DEBUG -> got HTTP data: 6
19:30
3d
86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
0


IpToCountry: hsc-clan.hu returned bad data! Switching to alternate.
DEBUG -> Requesting host: 86.101.218.166 -> return: !Resolving now
DEBUG -> got HTTP data: 6
19:30
3d
86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
0


IpToCountry: hsc-clan.hu returned bad data! Switching to alternate.
DEBUG -> Requesting host: 86.101.218.166 -> return: !Resolving now
DEBUG -> Requesting host: 86.101.218.166 -> return: !Resolving now
DEBUG -> got HTTP data: 43
19:30 86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
0


DEBUG -> Requesting host: 86.101.218.166 -> return: 86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
DEBUG -> Requesting host: 86.101.218.166 -> return: 86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
[Hostname Ban] New Player: ~*h$c*~Miska - 86.101.218.166 - catv-5665daa6.catv.broadband.hu
[Hostname Ban] ~*h$c*~Miska - Login Accepted

[BSC]MasterJohnny
21st August, 2007, 07:38 PM
Hmm it works with the UA dbase, so the problem is probably on my side.
Here's the debug from UA, maybe it helps:
Login: ~*h$c*~Miska
OPBan: Watcher 0 starting
Possessed PlayerPawn: EUTFemale2 DM-1on1-Rose.EUTFemale0
2007-08-21 19:54.52 ~*h$c*~Miska....Client Connected [IP] 86.101.218.166
DEBUG -> Requesting host: 86.101.218.166 -> return: !Added to queue
DEBUG -> got HTTP data: 19:37 86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
DEBUG -> Requesting host: 86.101.218.166 -> return: 86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
DEBUG -> Requesting host: 86.101.218.166 -> return: 86.101.218.166:catv-5665daa6.catv.broadband.hu:HUNGARY:HUN:hu
[Hostname Ban] New Player: ~*h$c*~Miska - 86.101.218.166 - catv-5665daa6.catv.broadband.hu
[Hostname Ban] ~*h$c*~Miska - Login Accepted
OPBan: Watcher 0 checking IPPolicy for 86.101.218.166:1721
OPBan: Shutting down watcher 0 after 1 seconds

XEvilWyvernX
21st August, 2007, 09:33 PM
I dont get any output back when trying to test just a blank page so Im assuming I need to change a setting in the php.ini or i need to open a port
any suggestions

sphx
21st August, 2007, 10:04 PM
I dont get any output back when trying to test just a blank page so Im assuming I need to change a setting in the php.ini or i need to open a port
any suggestions

add ?ip=212.91.96.138 (example) and you should get some result

XEvilWyvernX
22nd August, 2007, 12:07 AM
add ?ip=212.91.96.138 (example) and you should get some result

Oh really tell me what you get lol

http://scarface.worldclancenter.net/iptocountry13.php?ip=212.91.96.138

Lol host even installed the geoIp php module and the perl module and the apache module. I can change the php.ini settings but havent tried wasnt sure if It needed something specific left on or off

sphx
22nd August, 2007, 10:19 AM
humm anthrax can you also replace the old iptocountry12.php with the new version (so iptocountry12.php & iptocountry13.php are the same) so I don't need to change iptocountry.ini for all my servers.

thanks

AnthraX
22nd August, 2007, 10:36 AM
humm anthrax can you also replace the old iptocountry12.php with the new version (so iptocountry12.php & iptocountry13.php are the same) so I don't need to change iptocountry.ini for all my servers.

thanks

I will do that when it's fully tested

sphx
22nd August, 2007, 10:46 AM
I will do that when it's fully tested

roger!

I've got it on 3 servers now :

[PURE] Ducks 4 Hire by Speicherland 213.148.132.101:8000 pw: w4r
[PURE] Saicosa UT99 Server by speicherland.com 213.148.132.103:7800 pw: w4r
[PURE] ~ Desire server by speicherlans 213.148.132.103:8800 pw: w4r

ConfQueryServers[0]=87.72.116.33,upload.com.hr/iptocountry/iptocountry13.php
ConfQueryServers[1]=85.236.100.16,utgl.unrealadmin.org/iptocountry13.php


works great for now... you can check it & I'm willing to do some testing for you if you need it.

AnthraX
22nd August, 2007, 10:54 AM
works great for now... you can check it & I'm willing to do some testing for you if you need it.

I can't really check any servers anymore. I get kicked by any server that runs UTDCv1.8.

sphx
22nd August, 2007, 10:57 AM
I can't really check any servers anymore. I get kicked by any server that runs UTDCv1.8.

utdc 2.0 on these, I hope it works for you...

AnthraX
22nd August, 2007, 11:03 AM
utdc 2.0 on these, I hope it works for you...

Well, I haven't tested it before today but apperantly, UTDC 2.0 gives me a very nice general protection fault :)

sphx
22nd August, 2007, 11:06 AM
Well, I haven't tested it before today but apperantly, UTDC 2.0 gives me a very nice general protection fault :)

:\

SoNY_scarface
22nd August, 2007, 12:01 PM
"ConfQueryServers[0]=85.236.100.16,utgl.unrealadmin.org/iptocountry13.php".


are wwe supposed to change ConfQueryServers[0] along with #1 aswell? i see sphx changed both .....for now i have changed ConfQueryServers[0] to what u said but ConfQueryServers[1] remains as 153.19.48.14/iptocountry12.php is this sposed to change?

AnthraX
22nd August, 2007, 12:06 PM
are wwe supposed to change ConfQueryServers[0] along with #1 aswell? i see sphx changed both .....for now i have changed ConfQueryServers[0] to what u said but ConfQueryServers[1] remains as 153.19.48.14/iptocountry12.php is this sposed to change?

ConfQueryServers[1] is just a backup server. It won't be used unless server 0 fails.

SoNY_scarface
22nd August, 2007, 12:24 PM
is there iptocountry13.php backup i can put into ConfQueryServers[1]? instead of ConfQueryServers[1] remaining as 153.19.48.14/iptocountry12.php?

sphx
22nd August, 2007, 12:49 PM
is there iptocountry13.php backup i can put into ConfQueryServers[1]? instead of ConfQueryServers[1] remaining as 153.19.48.14/iptocountry12.php?

153.19.48.14/iptocountry12.php is offline so no reason holding it....

you can use my server as backup one (1.3 also)

ConfQueryServers[1]=87.72.116.33,upload.com.hr/iptocountry/iptocountry13.php

sphx
23rd August, 2007, 10:46 AM
I've looked into the code to find out what went wrong with some error codes and made little modifications to iptocountry13.php:
- added <?php (php5 by default doesn't read <? as opening tag) ->> XEvilWyvernX this should solve your "blank page" problem, try it
- header("Content-Type: text/html; charset=utf-8"); -> this way we're sure what kind of output we get
- in php4 output was broken and for some reason. the way it was written before, $gmt echo was read by UT, and not the rest info...

<?php
header("Content-Type: text/html; charset=utf-8");

-cut-...

/* Handling for single IP requests -> fixed by sphx */

$ip_info = $ip[$i].":".gethostbyaddr($ip[$i]).":".$Country.":".$Prefix2.":".$Prefix1;

if ($i == 0)
{
if(isset($_GET['playerid']))
$playerid = $_GET['playerid'].":";

echo $gmt." ".$playerid.$ip_info;
}
else
{
echo ",".$ip_info;
}

here's a file for you to download, I've called it iptocountry13v2.php so we don't get confused ;)

http://upload.com.hr/sphx/iptocountry13v2.rar

please post some feedback if this works/doesn't :)

[BSC]MasterJohnny
23rd August, 2007, 04:17 PM
works fine now :thumbup:

SoNY_scarface
27th August, 2007, 05:07 PM
iptocountry not working ?

ScriptLog: IpToCountry: utgl.unrealadmin.org timed out after 10 seconds!
ScriptLog: IpToCountry: utgl.unrealadmin.org failed! Trying the alternate.
ScriptWarning: LinkActor CTF-'((MoonRun))_LGI.LinkActor0 (Function IpToCountry.LinkActor.DoBind:000A) BindPort: already bound
ScriptLog: IpToCountry: Error binding local port.
ScriptLog: IpToCountry: upload.com.hr failed! Trying the alternate.
ScriptWarning: LinkActor CTF-'((MoonRun))_LGI.LinkActor0 (Function IpToCountry.LinkActor.DoBind:000A) BindPort: already bound
ScriptLog: IpToCountry: Error binding local port.
ScriptLog: IpToCountry: utgl.unrealadmin.org failed! Trying the alternate.
ScriptWarning: LinkActor CTF-'((MoonRun))_LGI.LinkActor0 (Function IpToCountry.LinkActor.DoBind:000A) BindPort: already bound

SoNY_scarface
19th September, 2007, 09:20 PM
ip to country almost never works now.....any ideas why? iv left the settings as they were when workin...

sphx
20th September, 2007, 03:18 PM
ip to country almost never works now.....any ideas why? iv left the settings as they were when workin...

my server is down for maintenance atm, I don't know what's up with utgl, slap anthrax...

SoNY_scarface
20th September, 2007, 03:30 PM
i tried to host it on my server wudnt work....i guess i dont know how to set it up :(

AnthraX
20th September, 2007, 03:38 PM
There's nothing wrong with the utgl server. Your problem is either due to a firewall or due to another (game)server that runs on the port IpToCountry tries to bind. The firewall seems more likely as you keep having this problem.

SoNY_scarface
20th September, 2007, 04:19 PM
which port it use?

also sphx http://upload.com.hr/sphx/iptocountry13v2.rar dont work...can u host it somewhere else for now real quick? http://www.mediafire.com/?

SoNY_scarface
24th September, 2007, 01:28 PM
sp is ur server back up? i need the fixes download u made to the iptocountry13.php

sphx
24th September, 2007, 02:17 PM
sp is ur server back up? i need the fixes download u made to the iptocountry13.php

huh ok, here's a link for you :

http://adria.fesb.hr/~aaljinov/

iptocountry13v2 so download it.

my server is on but lost all data... backup is a bitch :\

SoNY_scarface
25th September, 2007, 07:36 PM
still not working......
ScriptLog: IpToCountry: Got HTTP error with code 404 from upload.com.hr!
ScriptLog: IpToCountry: upload.com.hr failed! Trying the alternate.

also what are the returns here im trying to host it myself but doesnt seem to work for me...

http://scarface.worldclancenter.net/iptocountry13.php?ip=209.160.74.61
http://scarface.worldclancenter.net/iptocountry13v2.php?ip=209.160.74.61

iv hosted iptocountry13.php and iptocountry13v2.php still no return just a blank page

sphx
26th September, 2007, 09:47 AM
still not working......
ScriptLog: IpToCountry: Got HTTP error with code 404 from upload.com.hr!
ScriptLog: IpToCountry: upload.com.hr failed! Trying the alternate.

also what are the returns here im trying to host it myself but doesnt seem to work for me...

http://scarface.worldclancenter.net/iptocountry13.php?ip=209.160.74.61
http://scarface.worldclancenter.net/iptocountry13v2.php?ip=209.160.74.61

iv hosted iptocountry13.php and iptocountry13v2.php still no return just a blank page

that's true, my server is down atm, why don't you use UTGL one as secondary ?

I'll get my server back up when I'm done with maintenance

SoNY_scarface
26th September, 2007, 04:30 PM
y does it return a blank page? and whats the link for utgl server?

this is what i have in my ini ConfQueryServers[0]=87.72.116.33,upload.com.hr/iptocountry/iptocountry13.php
ConfQueryServers[1]=85.236.100.16,utgl.unrealadmin.org/iptocountry13.php

still doesnt reslove

sphx
26th September, 2007, 07:18 PM
y does it return a blank page? and whats the link for utgl server?

this is what i have in my ini ConfQueryServers[0]=87.72.116.33,upload.com.hr/iptocountry/iptocountry13.php
ConfQueryServers[1]=85.236.100.16,utgl.unrealadmin.org/iptocountry13.php

still doesnt reslove

try:

ConfQueryServers[0]=85.236.100.16,utgl.unrealadmin.org/iptocountry13.php
ConfQueryServers[1]=87.72.116.33,upload.com.hr/iptocountry/iptocountry13.php


I'll update upload.com.hr soon... 2-3 days probb

SoNY_scarface
27th September, 2007, 03:57 PM
any ideas why my host returns an empty/blank page?

g0sbv
27th September, 2007, 04:32 PM
Try This substituting the url for your own one and path/folder if any you should get a return instead of a blank page.

http://utgl.unrealadmin.org/iptocountry13.php?ip=62.212.83.150,82.133.85.65

SoNY_scarface
27th September, 2007, 04:45 PM
i get a return on that but im trying to host this myself....all i get is a blank page

http://scarface.worldclancenter.net/iptocountry13.php?ip=209.160.74.61
http://scarface.worldclancenter.net/iptocountry13v2.php?ip=209.160.74.61

[BSC]MasterJohnny
27th September, 2007, 05:47 PM
Did you upload all the necessary files?

sphx
27th September, 2007, 07:43 PM
i get a return on that but im trying to host this myself....all i get is a blank page

http://scarface.worldclancenter.net/iptocountry13.php?ip=209.160.74.61
http://scarface.worldclancenter.net/iptocountry13v2.php?ip=209.160.74.61

icq: 162633629

msn: zaljinov@<hidden>

contact me

SoNY_scarface
27th September, 2007, 11:10 PM
MasterJohnny;131127']Did you upload all the necessary files?

iv uploaded the geoip.dat, index.html, iptcountry13.php and 13v2.php and also ip_files folder

SoNY_scarface
27th September, 2007, 11:12 PM
icq: 162633629

msn: zaljinov@<hidden>

contact me

will do added to msn :thumbup:

[BSC]MasterJohnny
2nd October, 2007, 07:24 PM
As long as they keep the database in the same binary format, you can just replace the GeoIP.dat file whenever it gets updated.
How will I notice that the binary format changed? Opening the file with an editor gives awful characters.:P

sphx
3rd October, 2007, 01:15 PM
well if they change something it just wont work anymore, php queries will fail.

SoNY_scarface
5th October, 2007, 03:49 PM
hmmmm i was looking at the IPtocountry.ini and noticed it logs the IP's and has a max log of 255 so .....what happens when it reaches IPData[255]= ? does it mean it stops resolving IPtocountries? O_o

ps. sphx u guna get on msn sometimes soon? lol

AnthraX
5th October, 2007, 05:19 PM
hmmmm i was looking at the IPtocountry.ini and noticed it logs the IP's and has a max log of 255 so .....what happens when it reaches IPData[255]= ? does it mean it stops resolving IPtocountries? O_o

ps. sphx u guna get on msn sometimes soon? lol

No, it's just a cache that can hold 255 ip's. This means that if your IP is in the IPData list, the server won't have to connect to the masterserver to retrieve the IP info. If it reaches 255, it will probably start caching at 0 again, that way it will always store the results of the last 256 resolves.

sphx
10th October, 2007, 06:11 PM
I've made a release of MODOSUtils with IpToCountry & packed v 1.4 masterserver inside, o there's a difference between that one and normal 1.3 that doesn't work on php5(default settings).

grab it from: http://sphx.vulturezone.com

~Ganesh~
10th October, 2007, 07:31 PM
i'll try it right away :>

edit:
works great so far, thanks for this one!

Thing
12th October, 2007, 11:00 PM
I've made a release of MODOSUtils with IpToCountry & packed v 1.4 masterserver inside, o there's a difference between that one and normal 1.3 that doesn't work on php5(default settings).

grab it from: http://sphx.vulturezone.com

i 've installed and looks good, but i found many "timer" in the serverlog:
(the log was over 5 mb after few hours playing)

ScriptLog: TIME
ScriptLog: TIMER
ScriptLog: TIME
ScriptLog: TIMER
ScriptLog: TIMER2
ScriptLog: TIMER3

and so on.

maybe a bug?

greetz Thing

~Ganesh~
13th October, 2007, 07:58 AM
yea, noticed the same...

sphx
13th October, 2007, 10:49 AM
yea, noticed the same...

it's normal behaviour for iptocountry, I don't know if it's a bug or not, I could check the code to see why does it log that much...

~Ganesh~
13th October, 2007, 12:27 PM
you mean normal when it runs in combination with modosutils?
i dont recall that it logged that much when i ran it just with
smartctf...
guess its more a problem if someone runs it on a well-frequented
public...

talking about iptocountry...
i kinda lost track about the several versions...
if i'm right you inculded files from version of 1.2 in that package?
i kept using the files from version 1.2v3, seems to work good too.

sphx
14th October, 2007, 02:57 PM
ok, I'll remove that TIMER logging tomorrow.

~Ganesh~
19th October, 2007, 07:58 PM
between those timers are some occasional


ScriptLog: DESTROY ? O_o


dunno if this has to do with it also.
havent noticed them in the logs before.

sphx
21st October, 2007, 10:06 AM
between those timers are some occasional


ScriptLog: DESTROY ? O_o


dunno if this has to do with it also.
havent noticed them in the logs before.

function Timer()
{
local PlayerPawn P;
local string temp;
log("TIME");
if (Owner == None)
{
log("DESTROY ? O_o");
Destroy();
return;
}
log("TIMER");
if(IpToCountry != None)
{
log("TIMER2");
if(CountryPrefix == "")
{
log("TIMER3");
P=PlayerPawn(Owner.Owner); // owner is playerreplicationinfo, owner.owner must be player then
if(NetConnection(P.Player) != None)
{
temp=P.GetPlayerNetworkAddress();
temp=Left(temp, InStr(temp, ":"));
temp=IpToCountry.GetItemName(temp);
if(temp == "!Disabled") /* after this return, iptocountry won't resolve anything anyway */
IpToCountry=None;
else if(Left(temp, 1) != "!") /* good response */
{
CountryPrefix=SelElem(temp, 5);
log("FOUND COUNTRY PREFIX");
if(CountryPrefix=="") /* the country is probably unknown(maybe LAN), so as the prefix */
IpToCountry=None;
}
}
else
IpToCountry=None;
}
else
IpToCountry=None;
}

if (Pawn(Owner.Owner).IsA('PlayerPawn') && PlayerPawn(Owner.Owner).player != None)
P = PlayerPawn(Owner.Owner);

if (ShowBonusInfo == 1)
{
if (Pawn(Owner.Owner).IsA('PlayerPawn') && PlayerPawn(Owner.Owner).player != None)
Info=Clamp(PlayerPawn(Owner.Owner).player.CurrentNetSpeed, 0, 50000);
else
Info=0;
}
else if (ShowBonusInfo == 2)
{
Info = Clamp(int((float(Pawn(Owner.Owner).KillCount) / float(Pawn(Owner.Owner).KillCount+Pawn(Owner.Owner).DieCount)) * 100), 0, 100);
}
}


-> that's original code from Rush. It's just logging stuff, can be disabled to clean up server log...

~Ganesh~
30th October, 2007, 09:41 PM
sure, if you say so...
i went back to my old modos30/smartctf
configuration for a couple of days to test
things...
there was no timer-logging whatsoever...
so i guess there is something in your modos-
version that calls that function at times...
for me its not a big problem tho...

sphx
5th November, 2007, 06:07 PM
sure, if you say so...
i went back to my old modos30/smartctf
configuration for a couple of days to test
things...
there was no timer-logging whatsoever...
so i guess there is something in your modos-
version that calls that function at times...
for me its not a big problem tho...

look @<hidden> my last post... rush made that logging (TIMERS), see the code...

~Ganesh~
7th November, 2007, 04:46 PM
look @<hidden> my last post... rush made that logging (TIMERS), see the code...

you said it before, i understood it before.
i was only trying to find out why there is no
timer-logging when you use iptocountry/smartctf4d,
but theres notable logging when you use
iptocountry/smartctf4d/modos2.6pre5.
never mind.

[BSC]MasterJohnny
7th November, 2007, 07:46 PM
I think Rush commented it out when he implented into SmartCTF4D.

StaR
16th November, 2008, 09:36 AM
maybe there's any tammy admin who can update their servers with the newest iptocountry database.. cause lots of players dont have a flag nowadays. would be cool! :)

SoNY_scarface
2nd September, 2009, 10:19 PM
Still waiting for SPHX to sign onto MSN.

The link is dead for the 1.4 Master Server. Does anyone have the version sp released?

sphx
3rd September, 2009, 02:31 PM
RELEASE: IpToCountry MasterServer v1.5

I've made some changes in the code, should run smooth on php4/5. I've tested it on the last GeoIP.dat (that's packed inside the release), and it works.

here's a link that wont die soon (readme inside):

http://adria.fesb.hr/~aaljinov/summercup/IPToCountry_MasterServer_v1.5.zip

I've also setup an iptocountry masterserver on the same domain, so you can use it as backup one:

ConfQueryServers[1]=161.53.166.5,adria.fesb.hr/~aaljinov/iptocountry/iptocountry15.php

Sp0ngeb0b
3rd September, 2009, 04:02 PM
Does it support dynamic IPs? (With a domain-name)

sphx
3rd September, 2009, 04:10 PM
Does it support dynamic IPs? (With a domain-name)

no, but why would you want to use a dynamic domain as a iptocountry server ?

you can use any combination of those servers for your primary/secondary:

ConfQueryServers[0]=PRIMARY SERVER
ConfQueryServers[1]=BACKUP SERVER

SERVERS:
64.34.170.212,iptocountry.ut-files.com/iptocountry13.php
85.236.100.16,utgl.unrealadmin.org/iptocountry13.php
161.53.166.5,adria.fesb.hr/~aaljinov/iptocountry/iptocountry15.php

hint for server admins:

to maintain backwards compatibility, if you have iptocountry 1.2 or higher already installed, you can just rename the iptocountry15.php and overwrite the old file. Also, add the iptocountry15.php file and post your server in a reply in this thread. Idea is to have list of updated servers so server admins can choose which one to use.

UPDATE: re-download if you downloaded before 17:55

Sp0ngeb0b
3rd September, 2009, 05:14 PM
no, but why would you want to use a dynamic domain as a iptocountry server ?

Because I have a webserver located at my home which has a dynamic IP.

sphx
3rd September, 2009, 05:16 PM
Because I have a webserver located at my home which has a dynamic IP.

script works, but UT doesn't have DNS client...

so use one of the existing servers.

if your UT server is on the same machine, you can use 127.0.0.1,localhost/iptocountry... ;)