About us; PartnersPortfolio & major clientsFAQ, support & contacts
Web EngineeringWeb HostingWeb Consulting

0,00002s to find the country

50 thousand queries in one second using only 20kb of memory and reading at most 1.5kb from the hard disk in each query. Speed and low memory consumption are essential in Web server applications.


Binary: Windows executable file
Eternal non-transferable license for a single server. You will receive only the binary executable file for the Windows platform (any version), but not the source-code.

Development: source code
Based on the "Binary" license, but you will also receive all fully commented C source files ready to compile in any platform.

Full: full rights
Eternal license without limit on the number of servers, with full rights over the source code, allowing rights transfer, reselling and use of the algorithms and code in commercial projects. You will receive all fully commented C source files.


Convert IP
to country code

ip2cc.c is an ANSI C command line* application that receives an IPv4 number and returns the ISO 3166* two letter lower-case code that identifies the country assigned to that IP.

This C code was designed to be extremely fast in making that decision since this application is typically used in a Web site's home page where speed is important for first impressions. In order to achieve that a second ANSI C application was developed, mk-ip4db.c, that takes a standard file in a CSV* format similar to:



and tests, validates, optimizes and compacts it into a 2Mb binary database highly optimized for searches. With this database, ip2cc can always find any IP's country by looking only at 1.5kb (three 512 byte sectors) of that file. The search cycle is a C function with only 35 lines, including comments. During the search, the application always takes up less than 20kb of memory which is extremely important in a Web server environment with multiple running processes.

This application can thus achieve extremely fast results while using very few processing, memory and disk resources.


Software: ip2cc.c
Licensed according to one of the options on the left:





The applications are written in strict ANSI C and should therefore run practically on any computer platform, including Windows and Unix/Linux.

The purchase of this software makes you the owner of a ZIP file that will be e-mailed to you, containing:

  • The source-code or the executable binaries, depending on the purchased licensing (see to the left).

You will also be eligible for free e-mail technical support and free upgrades, should you find any flaws that are fixed.


These applications have been developed under Windows XP and Vista, compiled with GCC and were recompiled, installed and are in production in LAMP platforms* since 2003. ip2cc is used by this site for the initial auto-detection of country and probable visitor preferred language, as well as pre-selection of country in the order process.

The applications are also pre-installed and accessible to hosting clients. They have no known bugs.

Even though these applications don't need to run with special permissions, during their development special care was taken with the strict validation of buffers in order to prevent any buffer overflow attacks.

Group Corebase