This is a multi-part message in MIME format. -- Attached is a quick and dirty implementation for Python. It's hideously slow since it makes a select-query for each IP. It uses the GeoLite csv file imported into a MySQL database: http://www.maxmind.com/app/geoip_country
Be sure to change the logDir path to suit your installation. Quick tip to Ooks: If the database you used was MySQL, you can use the built-in sql functions inet_aton() and inet_ntoa() to convert between the two IP representations. See my script for details. Cheers, Einar Ooks Server wrote: > [ Converted text/html to text/plain ] > I used Microsoft Visual FoxPro. I found a csv with ip to country listings, > imported into a database, took all of my logs, imported them into another > database, stripped out all non-connect entries, leaving just the entries that > showed the players ip address. Stripped out all non-ip data from each entry, > and created a unique list of ip addresses. Wrote a quick and dirty ip > (xxx.xxx.xxx.xxx) to ip (999999999) program (because on table had ips in > xxx.xxx.xxx.xxx format, where the other had them in numeric format), and then > created a simple query that created an output list that would sum the total > number of unique ips per country. The code is crude, and a lot of the work is > done at the command line. It would take more time then it's worth to actually > take all of this and put it into a distributable module that others could take > and use :( > And when I lived in Saudi, gas was 30 cents a gallon :P > Tony Paloma wrote: > > I was mostly interested in the process of doing a country lookup on all > those IP addresses. If I have a bunch of IPs myself, how do I turn them into > a list like that? > -- [ cssip2country.py of type text/x-python deleted ] -- _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds