IP2Proxy Erlang Module

This Erlang module supports all IP2Proxy™ BIN database products to query an IP address if it is being used as virtual private networks (VPN), open proxies, web proxies, Tor exits, data center & web hosting ranges (DCH), search engine robots (SES), residential proxies (RES), consumer privacy networks (CPN), and enterprise private networks (EPN). It has been optimized for speed and memory utilization.

Installation
erlc ip2proxy.erl
Sample Codes
-module(test).
-export([testme/0]).

printme(V) ->
	case V of
		{} ->
			io:format("No results.~n", []);
		{ip2proxyrecord, Country_short, Country_long, Region, City, Isp, Proxy_type, Domain, Usage_type, Asn, As, Last_seen, Threat, Provider, Is_proxy} ->
			io:format("Country_short: ~p~n", [Country_short]),
			io:format("Country_long: ~p~n", [Country_long]),
			io:format("Region: ~p~n", [Region]),
			io:format("City: ~p~n", [City]),
			io:format("Isp: ~p~n", [Isp]),
			io:format("Proxy_type: ~p~n", [Proxy_type]),
			io:format("Domain: ~p~n", [Domain]),
			io:format("Usage_type: ~p~n", [Usage_type]),
			io:format("Asn: ~p~n", [Asn]),
			io:format("As: ~p~n", [As]),
			io:format("Last_seen: ~p~n", [Last_seen]),
			io:format("Threat: ~p~n", [Threat]),
			io:format("Provider: ~p~n", [Provider]),
			io:format("Is_proxy: ~p~n", [Is_proxy])
	end,
	io:format("===================================================================~n", []).

testme() ->
	X = "37.252.228.50",
	case ip2proxy:open("./IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP-DOMAIN-USAGETYPE-ASN-LASTSEEN-THREAT-RESIDENTIAL-PROVIDER.BIN") of
	0 ->
		io:format("getpackageversion: ~p~n", [ip2proxy:getpackageversion()]),
		io:format("getmoduleversion: ~p~n", [ip2proxy:getmoduleversion()]),
		io:format("getdatabaseversion: ~p~n", [ip2proxy:getdatabaseversion()]),
		V1 = ip2proxy:getall(X),
		printme(V1),
		
		io:format("Country_short: ~p~n", [ip2proxy:getcountryshort(X)]),
		io:format("Country_long: ~p~n", [ip2proxy:getcountrylong(X)]),
		io:format("Region: ~p~n", [ip2proxy:getregion(X)]),
		io:format("City: ~p~n", [ip2proxy:getcity(X)]),
		io:format("Isp: ~p~n", [ip2proxy:getisp(X)]),
		io:format("Proxy_type: ~p~n", [ip2proxy:getproxytype(X)]),
		io:format("Domain: ~p~n", [ip2proxy:getdomain(X)]),
		io:format("Usage_type: ~p~n", [ip2proxy:getusagetype(X)]),
		io:format("Asn: ~p~n", [ip2proxy:getasn(X)]),
		io:format("AS: ~p~n", [ip2proxy:getas(X)]),
		io:format("Last_seen: ~p~n", [ip2proxy:getlastseen(X)]),
		io:format("Threat: ~p~n", [ip2proxy:getthreat(X)]),
		io:format("Provider: ~p~n", [ip2proxy:getprovider(X)]),
		io:format("Is_proxy: ~p~n", [ip2proxy:isproxy(X)]);
	_ ->
		io:format("Error reading BIN file~n", [])
	end,
	
	case ip2proxy:close() of
	-1 ->
		io:format("Error occurred~n", []);
	_ ->
		ok
	end.
Sample IP2Proxy Databases (BIN)
Sample Packages - BIN File IPv4 + IPv6
IP2Proxy PX1 Download (20.69 MB)
IP2Proxy PX2 Download (23.17 MB)
IP2Proxy PX3 Download (27.55 MB)
IP2Proxy PX4 Download (32.29 MB)
IP2Proxy PX5 Download (33.72 MB)
IP2Proxy PX6 Download (34.01 MB)
IP2Proxy PX7 Download (36.69 MB)
IP2Proxy PX8 Download (37.84 MB)
IP2Proxy PX9 Download (37.69 MB)
IP2Proxy PX10 Download (45.43 MB)
IP2Proxy PX11 Download (46.34 MB)
Pop Up Box

Discover Your User Locations

Retrieve geolocation data for FREE now!