forked from chrislim2888/IP2Location-C-Library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
53 lines (42 loc) · 1.82 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
===========================
IP2Location C Library
===========================
IP2Location is a C library that enables the user to find the country, region, city, latitude, longitude, zip code, time zone, ISP, domain name, connection type, area code, weather, mobile network, elevation, usage type by IP address or hostname originates from. It contains a demo IP2Location IP-COUNTRY BIN database which consists of real data for IP address range 0.0.0.0 to 99.255.255.255. This database contains IP address blocks as key and countries as values. The paid version of IP2Location database covers all IP address range. In general, it is more complete, fast and accurate than using reverse DNS lookups. Developers can download other sample databases to evaluate other features such as region, city, latitude, longitude, zip code, ISP, domain name, connection, area code, weather code, mobile network, elevation, and usage type code using the same C library.
For more details, please visit:
http://www.ip2location.com/c.aspx
http://www.ip2location.com/developers.aspx
This version also supports IP2Location IPv6.
Installation
------------
[ Unix/Linux ]
cd C-IP2Location-<version>
autoreconf -i -v --force
./configure
make
cd data
perl ip-country.pl
[ Windows ]
Execute "vcvarsall.bat". (This file is part of Microsoft Visual C, not ip2location code)
nmake -f Makefile.win
cd data
perl ip-country.pl
[ MacOS ]
cd C-IP2Location-<version>
autoreconf -i -v --force
export CFLAGS=-I/usr/include/malloc
./configure
make
cd data
perl ip-country.pl
Testing
-------
cd C-IP2Location-<version>
cd test
test-IP2Location
Download More Sample Databases
------------------------------
cd C-IP2Location-<version>
wget http://www.ip2location.com/download/samples-db24.zip
unzip samples-db24.zip
For support, please email [email protected].
http://www.ip2location.com