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 Haskell Package
This IP Geolocation package is the Haskell programming language package to support all IP2Location™ database products. It has been optimized for speed and memory utilization. Developers can use the package to query all IP2Location™ binary databases for applications written using the Haskell programming language.
cabal install IP2Location
import IP2Location
main :: IO ()
main = do
let myfile = "IPV6-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-ADDRESSTYPE-CATEGORY-DISTRICT-ASN.BIN"
meta <- doInit myfile
result <- doQuery myfile meta "8.8.8.8"
putStrLn $ "country_short: " ++ (show (country_short result))
putStrLn $ "country_long: " ++ (show (country_long result))
putStrLn $ "region: " ++ (show (region result))
putStrLn $ "city: " ++ (show (city result))
putStrLn $ "isp: " ++ (show (isp result))
putStrLn $ "latitude: " ++ (show (latitude result))
putStrLn $ "longitude: " ++ (show (longitude result))
putStrLn $ "domain: " ++ (show (domain result))
putStrLn $ "zipcode: " ++ (show (zipcode result))
putStrLn $ "timezone: " ++ (show (timezone result))
putStrLn $ "netspeed: " ++ (show (netspeed result))
putStrLn $ "iddcode: " ++ (show (iddcode result))
putStrLn $ "areacode: " ++ (show (areacode result))
putStrLn $ "weatherstationcode: " ++ (show (weatherstationcode result))
putStrLn $ "weatherstationname: " ++ (show (weatherstationname result))
putStrLn $ "mcc: " ++ (show (mcc result))
putStrLn $ "mnc: " ++ (show (mnc result))
putStrLn $ "mobilebrand: " ++ (show (mobilebrand result))
putStrLn $ "elevation: " ++ (show (elevation result))
putStrLn $ "usagetype: " ++ (show (usagetype result))
putStrLn $ "addresstype: " ++ (show (addresstype result))
putStrLn $ "category: " ++ (show (category result))
putStrLn $ "district: " ++ (show (district result))
putStrLn $ "asn: " ++ (show (asn result))
putStrLn $ "as: " ++ (show (as result))
Discover Your User Locations
Retrieve geolocation data for FREE now!