You are an unregistered user, you can register here
Navigation

Information

Site

Donations
If you wish to make a donation you can by clicking the image below.


 
Go Back   The Unreal Admins Page > Forums > Unreal Admins > Unreal Tournament > UT Server - General Chat

Reply
Thread Tools Display Modes
  #121  
Unread 8th January, 2023, 03:18 PM
ShaiHulud ShaiHulud is offline
Dominating
 
Join Date: Mar 2012
Posts: 164
Default

Just a quick note for anyone pondering about updates. MaxMind has, as I'm sure you're aware, updated their database format and PHP API. While getting to grips with these updates will obviously be of benefit in the longer term, there is a stop-gap measure for compatibility with existing IpToCountry UT configurations.

If you grab an (apparently more recent) copy of "geoip.inc" from here, you can then get a recent copy of the IP database from various websites. These databases have been converted to work with the "legacy" API, so they'll function correctly with the UT IpToCountry setup.

I've used one from here -> grab the "IPv4" item from the "Maxmind - Country" category, extract the gzipped file (7zip will do this for you, for example), and then rename the file "GeoIP.dat" and upload it to your host. Another source is this website (the GeoIP.dat.gz file), which has an even more up-to-date copy, but I haven't tested whether this is equally compatible.

The only other thing I had to change (after switching web hosts to a provider running PHP8, which has much stricter type-checking compared to PHP5.6 on our previous host) was a line near the top of "iptocountry16.php":

Code:
FROM:
$timestamp = mktime(gmdate("H, i, s, m, d, Y")); // UTC time

TO:
$timestamp = mktime(time()); // UTC time
With these changes, we're now running with a nicely contemporary set of IP data again.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:58 PM.


 

All pages are copyright The Unreal Admins Page.
You may not copy any pages without our express permission.