C Library
This library is the C programming language library to support all IP2Proxy™ BIN database products to query proxy IP address and its country, region, city, ISP name and proxy types. It has been optimized for speed and memory utilization.
Installation
Unix/Linux
- Decompress the archive.
- Navigate to working directory.
cd ip2proxy-c-x.x.x
-
Run the following commands:
autoreconf -i -v --force ./configure make
- To test it, go to test folder.
cd test
- And run the sample application
test-IP2Proxy
Windows
- Decompress the archive.
- Open command prompt and navigate to Microsoft Visual Studio Visual C directory and execute vcvarsall.bat or vcvars32.bat. (Alternatively, open Visual Studio Command Prompt located in the start menu under Microsoft Visual Studio\Visual Studio Tools)
- Navigate to working directory.
cd ip2proxy-c-x.x.x
-
Run the following commands:
nmake Makefile.win
- To test it, go to test folder.
cd test
- And run the sample application
test-IP2Proxy
MacOS
- Decompress the archive.
- Navigate to working directory.
cd ip2proxy-c-x.x.x
-
Run the following commands:
autoreconf -i -v --force export CFLAGS=-I/usr/include/malloc ./configure make
- To test it, go to test folder.
cd test
- And run the sample application
test-IP2Proxy
Sample Codes
#include "IP2Proxy.h" IP2Proxy *IP2ProxyObj = IP2Proxy_open("../data/IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.SAMPLE.BIN"); IP2ProxyRecord *record = IP2Proxy_get_all(IP2ProxyObj, "161.11.12.13"); printf("%s %s %s %s %s %f %f %s %s %s %s %s %s %s %s %s %s %s %s %s\n", record->country_short, record->country_long, record->region, record->city, record->isp, record->is_proxy, record->proxy_type); IP2Proxy_free_record(record); IP2Proxy_close(IP2ProxyObj);
Sample IP2Proxy Databases (BIN)
Sample Packages | IPv4 |
---|---|
IP2Proxy PX1 Sample BIN File | Download (5.76 MB) |
IP2Proxy PX2 Sample BIN File | Download (6.99 MB) |
IP2Proxy PX3 Sample BIN File | Download (7.57 MB) |
IP2Proxy PX4 Sample BIN File | Download (13.95 MB) |