Version 5 (modified by omry, 15 years ago) (diff)



IP2C is a project that provide IP to country resolution using a binary file.
The binary file is compiled from ip-to-country free database.


IP2C is licensed under GPL2, if you would like to use it in a non-gpl application please Contact me to obtain a non-gpl license.

Binary file compiler

The binary file compiler is a small java application that converts the CSV file to the binary format.
Usage: java net.firestats.ip2c.IP2CountryCompiler input.cvs output.bin.
the resulting binary file is very compact, a 3.5mb CSV file results in an 467k binary file.

IP2Country resolver

usage example:
java net.firestats.ip2c.IP2Country
PHP class coming soon.


At the moment, only svn download is available:
to check out the latest code, run
svn co


Current java code takes less then 20ms to lookup an ip address in the full database on my computer.
this is working directly on the file, so memory usage is minimal (it does not load the whole file into memory).