C Library
PHP Module
Perl Module
Ruby Library
Python Library
Apache Module
Nginx Module
Node.js Module
Cocoa / Objective C Library
Pascal Library
D Library
Go Package
Erlang Module
Haskell Package
Debian Package
Lua Package
Kotlin Module
Scala Library
OpenResty Package
Splunk Add-on
Apache Kafka Transform
OCaml Module
Deno Module
R Package
.NET Component
Java Component
HTTP Module
ActiveX / COM DLL
IP2Location IP Geolocation Erlang Module
This IP Geolocation module is the Erlang programming language module to support all IP2Location™ database products. It has been optimized for speed and memory utilization. Developers can use the module to query all IP2Location™ binary databases for applications written using the Erlang programming language.
erlc ip2location.erl
-module(test).
-export([testme/0]).
printme(V) ->
case V of
{} ->
io:format("No results.~n", []);
{ip2locationrecord, Country_short, Country_long, Region, City, Isp, Latitude, Longitude, Domain, Zipcode, Timezone, Netspeed, Iddcode, Areacode, Weatherstationcode, Weatherstationname, Mcc, Mnc, Mobilebrand, Elevation, Usagetype, Addresstype, Category, District, Asn, As} ->
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("Latitude: ~p~n", [Latitude]),
io:format("Longitude: ~p~n", [Longitude]),
io:format("Domain: ~p~n", [Domain]),
io:format("Zipcode: ~p~n", [Zipcode]),
io:format("Timezone: ~p~n", [Timezone]),
io:format("Netspeed: ~p~n", [Netspeed]),
io:format("Iddcode: ~p~n", [Iddcode]),
io:format("Areacode: ~p~n", [Areacode]),
io:format("Weatherstationcode: ~p~n", [Weatherstationcode]),
io:format("Weatherstationname: ~p~n", [Weatherstationname]),
io:format("Mcc: ~p~n", [Mcc]),
io:format("Mnc: ~p~n", [Mnc]),
io:format("Mobilebrand: ~p~n", [Mobilebrand]),
io:format("Elevation: ~p~n", [Elevation]),
io:format("Usagetype: ~p~n", [Usagetype]),
io:format("Addresstype: ~p~n", [Addresstype]),
io:format("Category: ~p~n", [Category]),
io:format("District: ~p~n", [District]),
io:format("Asn: ~p~n", [Asn]),
io:format("As: ~p~n", [As])
end,
io:format("===================================================================~n", []).
testme() ->
ip2location:new("IPV6-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-ADDRESSTYPE-CATEGORY-DISTRICT-ASN.BIN"),
ip2location:getapiversion(),
V1 = ip2location:query("8.8.8.8"),
printme(V1),
ip2location:close().
Discover Your User Locations
Retrieve geolocation data for FREE now!