• Stars
    star
    437
  • Rank 99,054 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created about 8 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Use IP2Location geolocation database to lookup the geolocation information with IP2Location Go Package. It can be used to determine country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category that any IP address or hostname originates from.

Go Report Card PkgGoDev

IP2Location Go Package

This Go package provides a fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, station name, mcc, mnc, mobile brand, elevation, usage type, address type, IAB category, district, autonomous system number (ASN) and autonomous system (AS) from IP address by using IP2Location database. This package uses a file based database available at IP2Location.com. This database simply contains IP blocks as keys, and other information such as country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, station name, mcc, mnc, mobile brand, elevation, usage type, address type, IAB category, district, autonomous system number (ASN) and autonomous system (AS) as values. It supports both IP address in IPv4 and IPv6.

This package can be used in many types of projects such as:

  • select the geographically closest mirror
  • analyze your web server logs to determine the countries of your visitors
  • credit card fraud detection
  • software export controls
  • display native language and currency
  • prevent password sharing and abuse of service
  • geotargeting in advertisement

The database will be updated in monthly basis for the greater accuracy. Free LITE databases are available at https://lite.ip2location.com/ upon registration.

The paid databases are available at https://www.ip2location.com under Premium subscription package.

As an alternative, this package can also call the IP2Location Web Service. This requires an API key. If you don't have an existing API key, you can subscribe for one at the below:

https://www.ip2location.com/web-service/ip2location

Installation

go get github.com/ip2location/ip2location-go/v9

QUERY USING THE BIN FILE

Dependencies

This package requires IP2Location BIN data file to function. You may download the BIN data file at

IPv4 BIN vs IPv6 BIN

Use the IPv4 BIN file if you just need to query IPv4 addresses.

Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.

Methods

Below are the methods supported in this package.

Method Name Description
OpenDB Initialize the package with the BIN file.
Get_all Returns the geolocation information in an object.
Get_country_short Returns the country code.
Get_country_long Returns the country name.
Get_region Returns the region name.
Get_city Returns the city name.
Get_isp Returns the ISP name.
Get_latitude Returns the latitude.
Get_longitude Returns the longitude.
Get_domain Returns the domain name.
Get_zipcode Returns the ZIP code.
Get_timezone Returns the time zone.
Get_netspeed Returns the net speed.
Get_iddcode Returns the IDD code.
Get_areacode Returns the area code.
Get_weatherstationcode Returns the weather station code.
Get_weatherstationname Returns the weather station name.
Get_mcc Returns the mobile country code.
Get_mnc Returns the mobile network code.
Get_mobilebrand Returns the mobile brand.
Get_elevation Returns the elevation in meters.
Get_usagetype Returns the usage type.
Get_addresstype Returns the address type.
Get_category Returns the IAB category.
Get_district Returns the district name.
Get_asn Returns the autonomous system number (ASN).
Get_as Returns the autonomous system (AS).
Close Closes BIN file.

Usage

package main

import (
	"fmt"
	"github.com/ip2location/ip2location-go/v9"
)

func main() {
	db, err := ip2location.OpenDB("./IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-ADDRESSTYPE-CATEGORY-DISTRICT-ASN.BIN")
	
	if err != nil {
		fmt.Print(err)
		return
	}
	ip := "8.8.8.8"
	results, err := db.Get_all(ip)
	
	if err != nil {
		fmt.Print(err)
		return
	}
	
	fmt.Printf("country_short: %s\n", results.Country_short)
	fmt.Printf("country_long: %s\n", results.Country_long)
	fmt.Printf("region: %s\n", results.Region)
	fmt.Printf("city: %s\n", results.City)
	fmt.Printf("isp: %s\n", results.Isp)
	fmt.Printf("latitude: %f\n", results.Latitude)
	fmt.Printf("longitude: %f\n", results.Longitude)
	fmt.Printf("domain: %s\n", results.Domain)
	fmt.Printf("zipcode: %s\n", results.Zipcode)
	fmt.Printf("timezone: %s\n", results.Timezone)
	fmt.Printf("netspeed: %s\n", results.Netspeed)
	fmt.Printf("iddcode: %s\n", results.Iddcode)
	fmt.Printf("areacode: %s\n", results.Areacode)
	fmt.Printf("weatherstationcode: %s\n", results.Weatherstationcode)
	fmt.Printf("weatherstationname: %s\n", results.Weatherstationname)
	fmt.Printf("mcc: %s\n", results.Mcc)
	fmt.Printf("mnc: %s\n", results.Mnc)
	fmt.Printf("mobilebrand: %s\n", results.Mobilebrand)
	fmt.Printf("elevation: %f\n", results.Elevation)
	fmt.Printf("usagetype: %s\n", results.Usagetype)
	fmt.Printf("addresstype: %s\n", results.Addresstype)
	fmt.Printf("category: %s\n", results.Category)
	fmt.Printf("district: %s\n", results.District)
	fmt.Printf("asn: %s\n", results.Asn)
	fmt.Printf("as: %s\n", results.As)
	fmt.Printf("api version: %s\n", ip2location.Api_version())
	
	db.Close()
}

QUERY USING THE IP2LOCATION WEB SERVICE

Methods

Below are the methods supported in this package.

Method Name Description
OpenWS 3 input parameters:
  1. IP2Location API Key.
  2. Package (WS1 - WS25)
  3. Use HTTPS or HTTP
LookUp Query IP address. This method returns an object containing the geolocation info.
  • country_code
  • country_name
  • region_name
  • city_name
  • latitude
  • longitude
  • zip_code
  • time_zone
  • isp
  • domain
  • net_speed
  • idd_code
  • area_code
  • weather_station_code
  • weather_station_name
  • mcc
  • mnc
  • mobile_brand
  • elevation
  • usage_type
  • address_type
  • category
  • continent
    • name
    • code
    • hemisphere
    • translations
  • country
    • name
    • alpha3_code
    • numeric_code
    • demonym
    • flag
    • capital
    • total_area
    • population
    • currency
      • code
      • name
      • symbol
    • language
      • code
      • name
    • idd_code
    • tld
    • is_eu
    • translations
  • region
    • name
    • code
    • translations
  • city
    • name
    • translations
  • geotargeting
    • metro
  • country_groupings
  • time_zone_info
    • olson
    • current_time
    • gmt_offset
    • is_dst
    • sunrise
    • sunset
    GetCredit This method returns the web service credit balance in an object.

    Usage

    package main
    
    import (
    	"github.com/ip2location/ip2location-go/v9"
    	"fmt"
    )
    
    func main() {
    	apikey := "YOUR_API_KEY"
    	apipackage := "WS25"
    	usessl := true
    	addon := "continent,country,region,city,geotargeting,country_groupings,time_zone_info" // leave blank if no need
    	lang := "en" // leave blank if no need
    	
    	ws, err := ip2location.OpenWS(apikey, apipackage, usessl)
    	
    	if err != nil {
    		fmt.Print(err)
    		return
    	}
    	ip := "8.8.8.8"
    	res, err := ws.LookUp(ip, addon, lang)
    
    	if err != nil {
    		fmt.Print(err)
    		return
    	}
    
    	if res.Response != "OK" {
    		fmt.Printf("Error: %s\n", res.Response)
    	} else {
    		// standard results
    		fmt.Printf("Response: %s\n", res.Response)
    		fmt.Printf("CountryCode: %s\n", res.CountryCode)
    		fmt.Printf("CountryName: %s\n", res.CountryName)
    		fmt.Printf("RegionName: %s\n", res.RegionName)
    		fmt.Printf("CityName: %s\n", res.CityName)
    		fmt.Printf("Latitude: %f\n", res.Latitude)
    		fmt.Printf("Longitude: %f\n", res.Longitude)
    		fmt.Printf("ZipCode: %s\n", res.ZipCode)
    		fmt.Printf("TimeZone: %s\n", res.TimeZone)
    		fmt.Printf("Isp: %s\n", res.Isp)
    		fmt.Printf("Domain: %s\n", res.Domain)
    		fmt.Printf("NetSpeed: %s\n", res.NetSpeed)
    		fmt.Printf("IddCode: %s\n", res.IddCode)
    		fmt.Printf("AreaCode: %s\n", res.AreaCode)
    		fmt.Printf("WeatherStationCode: %s\n", res.WeatherStationCode)
    		fmt.Printf("WeatherStationName: %s\n", res.WeatherStationName)
    		fmt.Printf("Mcc: %s\n", res.Mcc)
    		fmt.Printf("Mnc: %s\n", res.Mnc)
    		fmt.Printf("MobileBrand: %s\n", res.MobileBrand)
    		fmt.Printf("Elevation: %d\n", res.Elevation)
    		fmt.Printf("UsageType: %s\n", res.UsageType)
    		fmt.Printf("AddressType: %s\n", res.AddressType)
    		fmt.Printf("Category: %s\n", res.Category)
    		fmt.Printf("CategoryName: %s\n", res.CategoryName)
    		fmt.Printf("CreditsConsumed: %d\n", res.CreditsConsumed)
    		
    		// continent addon
    		fmt.Printf("Continent => Name: %s\n", res.Continent.Name)
    		fmt.Printf("Continent => Code: %s\n", res.Continent.Code)
    		fmt.Printf("Continent => Hemisphere: %+v\n", res.Continent.Hemisphere)
    		
    		// country addon
    		fmt.Printf("Country => Name: %s\n", res.Country.Name)
    		fmt.Printf("Country => Alpha3Code: %s\n", res.Country.Alpha3Code)
    		fmt.Printf("Country => NumericCode: %s\n", res.Country.NumericCode)
    		fmt.Printf("Country => Demonym: %s\n", res.Country.Demonym)
    		fmt.Printf("Country => Flag: %s\n", res.Country.Flag)
    		fmt.Printf("Country => Capital: %s\n", res.Country.Capital)
    		fmt.Printf("Country => TotalArea: %s\n", res.Country.TotalArea)
    		fmt.Printf("Country => Population: %s\n", res.Country.Population)
    		fmt.Printf("Country => IddCode: %s\n", res.Country.IddCode)
    		fmt.Printf("Country => Tld: %s\n", res.Country.Tld)
    		fmt.Printf("Country => IsEu: %t\n", res.Country.IsEu)
    		
    		fmt.Printf("Country => Currency => Code: %s\n", res.Country.Currency.Code)
    		fmt.Printf("Country => Currency => Name: %s\n", res.Country.Currency.Name)
    		fmt.Printf("Country => Currency => Symbol: %s\n", res.Country.Currency.Symbol)
    		
    		fmt.Printf("Country => Language => Code: %s\n", res.Country.Language.Code)
    		fmt.Printf("Country => Language => Name: %s\n", res.Country.Language.Name)
    		
    		// region addon
    		fmt.Printf("Region => Name: %s\n", res.Region.Name)
    		fmt.Printf("Region => Code: %s\n", res.Region.Code)
    		
    		// city addon
    		fmt.Printf("City => Name: %s\n", res.City.Name)
    		
    		// geotargeting addon
    		fmt.Printf("Geotargeting => Metro: %s\n", res.Geotargeting.Metro)
    		
    		// country_groupings addon
    		for i, s := range res.CountryGroupings {
    			fmt.Printf("CountryGroupings => #%d => Acronym: %s\n", i, s.Acronym)
    			fmt.Printf("CountryGroupings => #%d => Name: %s\n", i, s.Name)
    		}
    		
    		// time_zone_info addon
    		fmt.Printf("TimeZoneInfo => Olson: %s\n", res.TimeZoneInfo.Olson)
    		fmt.Printf("TimeZoneInfo => CurrentTime: %s\n", res.TimeZoneInfo.CurrentTime)
    		fmt.Printf("TimeZoneInfo => GmtOffset: %d\n", res.TimeZoneInfo.GmtOffset)
    		fmt.Printf("TimeZoneInfo => IsDst: %s\n", res.TimeZoneInfo.IsDst)
    		fmt.Printf("TimeZoneInfo => Sunrise: %s\n", res.TimeZoneInfo.Sunrise)
    		fmt.Printf("TimeZoneInfo => Sunset: %s\n", res.TimeZoneInfo.Sunset)
    	}
    
    	res2, err := ws.GetCredit()
    
    	if err != nil {
    		fmt.Print(err)
    		return
    	}
    	
    	fmt.Printf("Credit Balance: %d\n", res2.Response)
    }

    IPTOOLS CLASS

    Methods

    Below are the methods supported in this package.

    Method Name Description
    func (t *IPTools) IsIPv4(IP string) bool Returns true if string contains an IPv4 address. Otherwise false.
    func (t *IPTools) IsIPv6(IP string) bool Returns true if string contains an IPv6 address. Otherwise false.
    func (t *IPTools) IPv4ToDecimal(IP string) (*big.Int, error) Returns the IP number for an IPv4 address.
    func (t *IPTools) IPv6ToDecimal(IP string) (*big.Int, error) Returns the IP number for an IPv6 address.
    func (t *IPTools) DecimalToIPv4(IPNum *big.Int) (string, error) Returns the IPv4 address for the supplied IP number.
    func (t *IPTools) DecimalToIPv6(IPNum *big.Int) (string, error) Returns the IPv6 address for the supplied IP number.
    func (t *IPTools) CompressIPv6(IP string) (string, error) Returns the IPv6 address in compressed form.
    func (t *IPTools) ExpandIPv6(IP string) (string, error) Returns the IPv6 address in expanded form.
    func (t *IPTools) IPv4ToCIDR(IPFrom string, IPTo string) ([]string, error) Returns a list of CIDR from the supplied IPv4 range.
    func (t *IPTools) IPv6ToCIDR(IPFrom string, IPTo string) ([]string, error) Returns a list of CIDR from the supplied IPv6 range.
    func (t *IPTools) CIDRToIPv4(CIDR string) ([]string, error) Returns the IPv4 range from the supplied CIDR.
    func (t *IPTools) CIDRToIPv6(CIDR string) ([]string, error) Returns the IPv6 range from the supplied CIDR.

    Usage

    package main
    
    import (
    	"github.com/ip2location/ip2location-go/v9"
    	"fmt"
    	"math/big"
    )
    
    func main() {
    	t := ip2location.OpenTools()
    	
    	ip := "8.8.8.8"
    	res := t.IsIPv4(ip)
    	
    	fmt.Printf("Is IPv4: %t\n", res)
    	
    	ipnum, err := t.IPv4ToDecimal(ip)
    	if err != nil {
    		fmt.Print(err)
    	} else {
    		fmt.Printf("IPNum: %v\n", ipnum)
    	}
    
    	ip2 := "2600:1f18:45b0:5b00:f5d8:4183:7710:ceec"
    	res2 := t.IsIPv6(ip2)
    	
    	fmt.Printf("Is IPv6: %t\n", res2)
    
    	ipnum2, err := t.IPv6ToDecimal(ip2)
    	if err != nil {
    		fmt.Print(err)
    	} else {
    		fmt.Printf("IPNum: %v\n", ipnum2)
    	}
    	
    	ipnum3 := big.NewInt(42534)
    	res3, err := t.DecimalToIPv4(ipnum3)
    	
    	if err != nil {
    		fmt.Print(err)
    	} else {
    		fmt.Printf("IPv4: %v\n", res3)
    	}
    	
    	ipnum4, ok := big.NewInt(0).SetString("22398978840339333967292465152", 10)
    	if ok {
    		res4, err := t.DecimalToIPv6(ipnum4)
    		if err != nil {
    			fmt.Print(err)
    		} else {
    			fmt.Printf("IPv6: %v\n", res4)
    		}
    	}
    	
    	ip3 := "2600:1f18:045b:005b:f5d8:0:000:ceec"
    	res5, err := t.CompressIPv6(ip3)
    	
    	if err != nil {
    		fmt.Print(err)
    	} else {
    		fmt.Printf("Compressed: %v\n", res5)
    	}
    	
    	ip4 := "::45b:05b:f5d8:0:000:ceec"
    	res6, err := t.ExpandIPv6(ip4)
    	
    	if err != nil {
    		fmt.Print(err)
    	} else {
    		fmt.Printf("Expanded: %v\n", res6)
    	}
    	
    	res7, err := t.IPv4ToCIDR("10.0.0.0", "10.10.2.255")
    	
    	if err != nil {
    		fmt.Print(err)
    	} else {
    		for _, element := range res7 {
    			fmt.Println(element)
    		}
    	}
    	
    	res8, err := t.IPv6ToCIDR("2001:4860:4860:0000:0000:0000:0000:8888", "2001:4860:4860:0000:eeee:ffff:ffff:ffff")
    	
    	if err != nil {
    		fmt.Print(err)
    	} else {
    		for _, element := range res8 {
    			fmt.Println(element)
    		}
    	}
    	
    	res9, err := t.CIDRToIPv4("123.245.99.13/26")
    	
    	if err != nil {
    		fmt.Print(err)
    	} else {
    		fmt.Printf("IPv4 Range: %v\n", res9)
    	}
    	
    	res10, err := t.CIDRToIPv6("2002:1234::abcd:ffff:c0a8:101/62")
    	
    	if err != nil {
    		fmt.Print(err)
    	} else {
    		fmt.Printf("IPv6 Range: %v\n", res10)
    	}
    }

    COUNTRY CLASS

    Methods

    Below are the methods supported in this package.

    Method Name Description
    func OpenCountryInfo(csvFile string) (*CI, error) Expect a IP2Location Country Information CSV file. This database is free for download at https://www.ip2location.com/free/country-information
    func (c *CI) GetCountryInfo(countryCode ...string) ([]CountryInfoRecord, error) Returns the country information for specified country or all countries.

    Usage

    package main
    
    import (
    	"github.com/ip2location/ip2location-go"
    	"fmt"
    )
    
    func main() {
    	c, err := ip2location.OpenCountryInfo("./IP2LOCATION-COUNTRY-INFORMATION.CSV")
    
    	if err != nil {
    		fmt.Print(err)
    		return
    	}
    
    	res, err := c.GetCountryInfo("US")
    
    	if err != nil {
    		fmt.Print(err)
    		return
    	}
    
    	fmt.Printf("country_code: %s\n", res[0].Country_code)
    	fmt.Printf("country_name: %s\n", res[0].Country_name)
    	fmt.Printf("country_alpha3_code: %s\n", res[0].Country_alpha3_code)
    	fmt.Printf("country_numeric_code: %s\n", res[0].Country_numeric_code)
    	fmt.Printf("capital: %s\n", res[0].Capital)
    	fmt.Printf("country_demonym: %s\n", res[0].Country_demonym)
    	fmt.Printf("total_area: %s\n", res[0].Total_area)
    	fmt.Printf("population: %s\n", res[0].Population)
    	fmt.Printf("idd_code: %s\n", res[0].Idd_code)
    	fmt.Printf("currency_code: %s\n", res[0].Currency_code)
    	fmt.Printf("currency_name: %s\n", res[0].Currency_name)
    	fmt.Printf("currency_symbol: %s\n", res[0].Currency_symbol)
    	fmt.Printf("lang_code: %s\n", res[0].Lang_code)
    	fmt.Printf("lang_name: %s\n", res[0].Lang_name)
    	fmt.Printf("cctld: %s\n", res[0].Cctld)
    	fmt.Print("==============================================\n")
    
    	res2, err := c.GetCountryInfo()
    
    	if err != nil {
    		fmt.Print(err)
    		return
    	}
    
    	for _, v := range res2 {
    		fmt.Printf("country_code: %s\n", v.Country_code)
    		fmt.Printf("country_name: %s\n", v.Country_name)
    		fmt.Printf("country_alpha3_code: %s\n", v.Country_alpha3_code)
    		fmt.Printf("country_numeric_code: %s\n", v.Country_numeric_code)
    		fmt.Printf("capital: %s\n", v.Capital)
    		fmt.Printf("country_demonym: %s\n", v.Country_demonym)
    		fmt.Printf("total_area: %s\n", v.Total_area)
    		fmt.Printf("population: %s\n", v.Population)
    		fmt.Printf("idd_code: %s\n", v.Idd_code)
    		fmt.Printf("currency_code: %s\n", v.Currency_code)
    		fmt.Printf("currency_name: %s\n", v.Currency_name)
    		fmt.Printf("currency_symbol: %s\n", v.Currency_symbol)
    		fmt.Printf("lang_code: %s\n", v.Lang_code)
    		fmt.Printf("lang_name: %s\n", v.Lang_name)
    		fmt.Printf("cctld: %s\n", v.Cctld)
    		fmt.Print("==============================================\n")
    	}
    }

    REGION CLASS

    Methods

    Below are the methods supported in this package.

    Method Name Description
    func OpenRegionInfo(csvFile string) (*RI, error) Expect a IP2Location ISO 3166-2 Subdivision Code CSV file. This database is free for download at https://www.ip2location.com/free/iso3166-2
    func (r *RI) GetRegionCode(countryCode string, regionName string) (string, error) Returns the region code for the supplied country code and region name.

    Usage

    package main
    
    import (
    	"github.com/ip2location/ip2location-go"
    	"fmt"
    )
    
    func main() {
    	r, err := ip2location.OpenRegionInfo("./IP2LOCATION-ISO3166-2.CSV")
    
    	if err != nil {
    		fmt.Print(err)
    		return
    	}
    
    	res, err := r.GetRegionCode("US", "California")
    
    	if err != nil {
    		fmt.Print(err)
    		return
    	}
    
    	fmt.Printf("region code: %s\n", res)
    }

    More Repositories

    1

    ip2location-iata-icao

    This list contains the airport codes of IATA airport code and ICAO airport code together with country code and region name supported in IP2Location geolocation database.
    147
    star
    2

    ip2location-nodejs

    IP2Location Node.js Module - Knowing where your visitors from.
    JavaScript
    93
    star
    3

    ip2location-laravel

    IP2Location Laravel extension enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, IP address type and IAB advertising category from IP address using IP2Location database.
    PHP
    75
    star
    4

    ip2proxy-php

    PHP module for IP2Proxy database lookup. It allows user to query an IP address if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
    PHP
    56
    star
    5

    ip2location-nginx

    This is IP2Location Nginx module that enables the user to find the country, region (state), city, latitude, longitude, zip code, time zone, ISP, domain name, connection type, area code, weather, mobile network, elevation, usage type, address type and IAB category by IP address or hostname originates from.
    C
    54
    star
    6

    ip2proxy-nodejs

    IP2Proxy Node.js module allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
    JavaScript
    48
    star
    7

    ip2location-java

    IP2Location IP Geolocation Java Component enables applications to get IP geolocation information from IP address such as the visitor’s country, region, city, latitude, longitude, ZIP code, ISP name, domain name, time zone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category.
    Java
    45
    star
    8

    ip2location-csv-converter

    This PHP script converts IP2Location CSV database into IP range or CIDR format.
    PHP
    35
    star
    9

    ip2trace-python

    Python tool to traceroute with IP geolocation information, such as country, region, city, isp and many more.
    Python
    32
    star
    10

    ip2location-piwik

    IP2Location geolocation service to lookup a visitor's location in Matomo (Piwik) 4.x, 5.x. This service allows you to determine the country, region, city, coordinates, zip code, time zone, ISP, domain, MCC, MNC, mobile brand name, elevation, usage type, address type, IAB category, and more, associated with any given IP address.
    PHP
    30
    star
    11

    ip2proxy-nginx

    A IP2Proxy module for Nginx HTTP server.
    C
    28
    star
    12

    ip2proxy-python

    Python library for IP2Proxy database lookup. It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.
    Python
    26
    star
    13

    ip2location-dotnet

    IP2Location IP Geolocation .NET component enables you to get your visitors' country, region, city, latitude, longitude, ZIP code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, usage type, address type, IAB category, district based on IP address.
    Visual Basic .NET
    26
    star
    14

    codeigniter-ip2location

    IP2Location library for CodeIgniter. Use IP2Location geolocation database to lookup the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation and usage type that any IP address or hostname originates from.
    PHP
    26
    star
    15

    ip2location-python-csv-converter

    This Python script converts IP2Location CSV database into IP range or CIDR format.
    Python
    23
    star
    16

    ip2location-ruby

    This is IP2Location Ruby library that enables the user to find the country, region, district, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, address type, IAB category and ASN that any IP address or hostname originates from.
    Ruby
    23
    star
    17

    ip2location-traceroute

    A traceroute tools that displaying geolocation information using IP2Location database.
    C
    22
    star
    18

    ip2proxy-go

    IP2Proxy Go package allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
    Go
    22
    star
    19

    logstash-filter-ip2location

    IP2Location filter plugin for Logstash enables Logstash's users to add geolocation information such as country, state, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection speed, IDD code, area code, weather station code, weather station name, MNC, MCC, mobile brand, elevation and usage type by IP address.
    Ruby
    20
    star
    20

    ip2location-nmap

    This IP2Location Nmap script provides a fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, station name, mcc, mnc, mobile brand, elevation, usage type, address type and IAB category from IP address by using the IP2Location Lua Package.
    Lua
    18
    star
    21

    ip2location-cakephp

    IP2Location CakePHP plugin enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, IP address type and IAB advertising category from IP address using IP2Location database.
    PHP
    18
    star
    22

    ip2proxy-java

    IP2Proxy Java Component.It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.
    Java
    17
    star
    23

    ip2location-lookup-py

    A free standalone software that enables end-users to detect country, region, city, latitude, longitude, ZIP code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category by using an IP address.
    Python
    17
    star
    24

    ipinfodb-php

    PHP library to query free IPInfoDB API service.
    PHP
    16
    star
    25

    ip2location-lua

    Use IP2Location geolocation database to lookup the geolocation information with IP2Location Lua Package. It can be used to determine country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category that any IP address or hostname originates from.
    Lua
    16
    star
    26

    ip2location-lookup

    A free standalone software that enables end-users to detect country, region, city, latitude, longitude, ZIP code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category by using an IP address.
    C
    14
    star
    27

    ip2location-php-api

    IP2Location PHP module provides an easy way to call the IP2Location API for geolocating an IP address and its country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation and usage type.
    PHP
    13
    star
    28

    ip2proxy-c

    To detect proxy servers with country, region, city, ISP and proxy type information using IP2Proxy binary database.
    Shell
    12
    star
    29

    ip2location-pascal

    This is a IP2Location Pascal Library that enables the user to find the country, region, district, city, latitude, longitude, zip code, time zone, ISP, domain name, connection type, area code, weather, mobile network, elevation, usage type, address type, IAB category and ASN by IP address or hostname originates from.
    Pascal
    12
    star
    30

    ip2location-io-php

    IP2Location.IO PHP SDK allows user to query for an enriched data set based on IP address and provides WHOIS lookup api that helps users to obtain domain information.
    PHP
    12
    star
    31

    ip2proxy-ruby

    Ruby library for IP2Proxy database lookup. It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.
    Ruby
    11
    star
    32

    docker-ip2location-mysql

    This is a pre-configured, ready-to-run MySQL server with IP2Location Geolocation database setup scripts. It simplifies the development team to install and set up the geolocation database in MySQL server.
    Shell
    11
    star
    33

    ip2proxy-laravel

    IP2Proxy Laravel extension enables the user to query an IP address if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
    PHP
    10
    star
    34

    ip2location_awstats

    Display visitors geolocation information by using IP2Location plugin for AwStats.
    Perl
    10
    star
    35

    ip2location-io-go

    IP2Location.io Go SDK allows user to query for an enriched data set based on IP address and provides WHOIS lookup api that helps users to obtain domain information.
    Go
    10
    star
    36

    ip2location-io-dotnet

    IP2Location.io .NET SDK allows user to query for an enriched data set based on IP address and provides WHOIS lookup api that helps users to obtain domain information.
    C#
    9
    star
    37

    ip2location-r

    Lookup for IP Address Information in R. Supported IPv4 and IPv6
    R
    9
    star
    38

    ip2location-io-cli

    IP2Location.io command line to query IP geolocation data from IP2Location.io API
    Go
    8
    star
    39

    ip2location-erlang

    Use IP2Location geolocation database to lookup the geolocation information with IP2Location Erlang Module. It can be used to determine country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category that any IP address or hostname originates from.
    Erlang
    8
    star
    40

    IP2Location-Varnish

    An Varnish module that enables the site or server admin to identify and obtain the geolocation information of their websites visitors based on IP address.
    C
    8
    star
    41

    ip2location-apache

    This is a IP2Location Apache Module 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, address type and IAB category by IP address or hostname originates from.
    C
    7
    star
    42

    ip2location-httpmodule

    IP2Location IP Geolocation HTTP Module is an IIS managed module, which enables you to determine info by IP address such as your visitor’s country of origin, region, city, latitude, longitude, ZIP code, ISP, domain name, time zone, connection speed, IDD code, area code, weather station code, and weather station name, mobile country code (MCC), mobile network code (MNC), carrier brand, usage type, elevation, address type and IAB category.
    Visual Basic .NET
    7
    star
    43

    ip2location-yii

    IP2Location Yii extension enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, IP address type and IAB advertising category from IP address using IP2Location database.
    PHP
    7
    star
    44

    ip2location-resty

    IP2Location geolocation library for OpenResty
    Lua
    6
    star
    45

    ip2proxy-kotlin

    IP2Proxy Kotlin can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.
    Kotlin
    6
    star
    46

    ip2location-d

    Use IP2Location geolocation database to lookup for accurate visitor location with D Library. It enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category that any IP address or hostname originates from.
    D
    6
    star
    47

    magento2-ip2location-countrystateblocker

    Block visitors to your website from certain countries and states. It support multiple rules for blocking/redirection.
    PHP
    6
    star
    48

    ip2proxy-lua

    IP2Proxy Lua package allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
    Lua
    5
    star
    49

    cidr-to-ip

    A PHP script to convert CIDR into IP address range in CSV file.
    PHP
    5
    star
    50

    ip2proxy-dotnet

    IP2Proxy .NET component allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
    Visual Basic .NET
    5
    star
    51

    ip2location-kotlin

    IP2Location IP Geolocation Kotlin enables applications to get IP geolocation information from IP address such as the visitor’s country, region, city, latitude, longitude, ZIP code, ISP name, domain name, time zone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category.
    Kotlin
    5
    star
    52

    docker-ip2location-postgresql

    This is a pre-configured, ready-to-run PostgreSQL with IP2Location Geolocation database setup scripts. It simplifies the development team to install and set up the geolocation database in PostgreSQL.
    Shell
    5
    star
    53

    ip2location-io-nodejs

    IP2Location.io Node.js SDK allows user to query for an enriched data set based on IP address and provides WHOIS lookup api that helps users to obtain domain information.
    JavaScript
    5
    star
    54

    ip2location-haskell

    Use IP2Location geolocation database to get geolocation information with IP2Location Haskell Package. It can be used to lookup the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category that any IP address or hostname originates from.
    Haskell
    5
    star
    55

    ip2proxy-codeigniter4

    IP2Proxy library for CodeIgniter. It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and TOR exits nodes, search engine robots, data center ranges and residential proxies.
    PHP
    5
    star
    56

    ip2location-revive-adserver

    IP2Location plugin for Revive Adserver.
    PHP
    4
    star
    57

    ip2convert

    This Go command line tool enables user to convert the IP2Location CSV into the MMDB format.
    Go
    4
    star
    58

    ip2location-io-ruby

    IP2Location.IO Ruby SDK allows user to query for an enriched data set based on IP address and provides WHOIS lookup api that helps users to obtain domain information.
    Ruby
    4
    star
    59

    ip2proxy-php-api

    IP2Proxy PHP module provides an easy way to call the IP2Proxy API to query proxy IP address and its country, region, city, ISP name and proxy types.
    PHP
    4
    star
    60

    ip2location-deno

    Deno module for IP2Location to lookup the geolocation information
    JavaScript
    4
    star
    61

    ip2proxy-varnish

    To detect proxy servers with country, region, city, ISP and proxy type information using IP2Proxy binary database.
    C
    4
    star
    62

    ip2location-io-java

    IP2Location.io Java SDK allows user to query for an enriched data set based on IP address and provides WHOIS lookup api that helps users to obtain domain information.
    Java
    4
    star
    63

    codeigniter-ip2proxy

    IP2Proxy library for CodeIgniter. It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and TOR exits nodes, search engine robots, data center ranges and residential proxies.
    PHP
    4
    star
    64

    steampipe-plugin-ip2locationio

    Use SQL to instantly query ip2location.io for IP address or WHOIS information. Open source CLI. No DB required.
    Go
    4
    star
    65

    ip2location-ipcountryredirection

    IP2Locationâ„¢ IP Country Redirect ("IPCountryRedirectionVB") module is designed for DotNetNuke community.
    3
    star
    66

    ip2proxy-erlang

    IP2Proxy Erlang module allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
    Erlang
    3
    star
    67

    ip2location-kafka

    IP2Location Kafka Transform enables applications to get info from IP address such as the visitor’s country, region, city, latitude, longitude, ZIP code, ISP name, domain name, time zone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category.
    Java
    3
    star
    68

    ip2proxy-cakephp

    IP2Proxy CakePHP plugin enables the user to query an IP address if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
    PHP
    3
    star
    69

    ip2location-perl

    This is IP2Location Perl Module that enables the user to find the country, region (state), city, latitude, longitude, zip code, time zone, ISP, domain name, connection type, area code, weather, mobile network, elevation, usage type, IP address type and IAB advertising category by IP address or hostname originates from.
    Perl
    3
    star
    70

    ip2location-activex

    IP2Location IP Geolocation ActiveX/COM DLL enables developers to discover Web visitors are coming from by IP address with info like the visitor’s country, region, city, latitude, longitude, ZIP code, ISP, domain name, time zone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category.
    C
    3
    star
    71

    ip2proxy-nmap

    This IP2Proxy Nmap script allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits by using the IP2Proxy Lua Package.
    Lua
    3
    star
    72

    docker-ip2location-mongodb

    This is a pre-configured, ready-to-run MongoDB server with IP2Location Geolocation database setup scripts. It simplifies the development team to install and set up the geolocation database in MongoDB server.
    Shell
    3
    star
    73

    ip2location-codeigniter4

    IP2Location library for CodeIgniter 4. Use IP2Location geolocation database to lookup the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation and usage type that any IP address or hostname originates from.
    PHP
    3
    star
    74

    ip2location-io-python

    IP2Location.IO Python SDK allows user to query for an enriched data set based on IP address and provides WHOIS lookup api that helps users to obtain domain information.
    Python
    3
    star
    75

    ip2location-perl-csv-converter

    This Perl script converts IP2Location CSV database into IP range or CIDR format.
    Perl
    3
    star
    76

    ip2proxy-matomo

    This is a Matomo plugin that generates a proxy report based on visitor's IP address.
    PHP
    2
    star
    77

    ip2proxy-r

    R package for IP2Proxy database lookup. It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.
    R
    2
    star
    78

    ip2proxy-resty

    IP2Proxy proxy detection library for OpenResty
    Lua
    2
    star
    79

    ip2location-io-lua

    IP2Location.io Lua SDK allows user to query for an enriched data set based on IP address and provides WHOIS lookup api that helps users to obtain domain information.
    Lua
    2
    star
    80

    ip2location-io-maltego

    IP2Location.io Maltego local transform
    Python
    2
    star
    81

    ip2location-io-erlang

    IP2Location.io Erlang SDK allows user to query for an enriched data set based on IP address and provides WHOIS lookup api that helps users to obtain domain information.
    Erlang
    2
    star
    82

    django-ip2location-timezone

    A simple Django package that can help you easily display your website visitor the time according to their location.
    Python
    2
    star
    83

    ip2location-cocoa

    This is IP2Location Cocoa library that enables the user to find the country, region (state), city, latitude, longitude, zip code, time zone, ISP, domain name, connection type, area code, weather, mobile network, elevation, usage type, address type and IAB category by IP address or hostname originates from.
    C
    2
    star
    84

    ip2proxy-pecl

    This PECL extension allows you to detect proxy servers with country, region, city, ISP, domain, usage type, ASN, security threat and proxy type information using IP2Proxy binary database.
    C
    2
    star
    85

    ip2proxy-httpmodule

    IP2Proxy HTTP Module is an IIS managed module allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
    Visual Basic .NET
    2
    star
    86

    ip2proxy-rust

    Rust library for IP2Proxy database lookup. It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.
    Rust
    2
    star
    87

    docker-ip2proxy-mongodb

    This is a pre-configured, ready-to-run MongoDB server with IP2Proxy database setup scripts. It simplifies the development team to install and set up the geolocation database in MongoDB server.
    Shell
    2
    star
    88

    ip2location-scala

    IP2Location IP Geolocation Scala enables applications to get IP geolocation information from IP address such as the visitor’s country, region, city, latitude, longitude, ZIP code, ISP name, domain name, time zone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category.
    Scala
    2
    star
    89

    logstash-filter-ip2proxy

    IP2Proxy filter plugin for Logstash enables Logstash's users to query an IP address if it was being used as open proxy, web proxy, VPN servers and TOR exits. It also appends country, state, city and ISP information of the server.
    Ruby
    2
    star
    90

    ip2location-io-kotlin

    IP2Location.io Kotlin SDK allows user to query for an enriched data set based on IP address and provides WHOIS lookup api that helps users to obtain domain information.
    Kotlin
    2
    star
    91

    ip2location-python-c

    This module is a Python Library with C that enables the user to find the country, region, city, coordinates, zip code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, mobile, usage type, address type and IAB category that any IP address or host name originates from. https://www.ip2location.com
    Python
    2
    star
    92

    ip2location-ocaml

    IP2Location IP Geolocation OCaml module enables you to get your visitors' country, region, city, latitude, longitude, ZIP code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category based on IP address.
    OCaml
    2
    star
    93

    ip2location-io-spring

    IP2Location.io Spring Middleware
    Java
    1
    star
    94

    docker-ip2proxy-mysql

    This is a pre-configured, ready-to-run MySQL server with IP2Proxy database setup scripts. It simplifies the development team to install and set up the geolocation database in MySQL server.
    Shell
    1
    star
    95

    ip2location-opencart4

    IP2Location IP country redirect extension for OpenCart 4.
    PHP
    1
    star
    96

    ip2location-io-ocaml

    IP2Location.io OCaml SDK allows user to query for an enriched data set based on IP address and provides WHOIS lookup api that helps users to obtain domain information.
    OCaml
    1
    star
    97

    ip2proxy-awstats

    Display visitors proxy information by using IP2Proxy plugin for AWStats.
    Perl
    1
    star
    98

    ip2proxy-scala

    IP2Proxy Scala can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.
    Scala
    1
    star
    99

    ip2proxy-deno

    IP2Proxy Deno module allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
    JavaScript
    1
    star
    100

    ip2proxy-d

    IP2Proxy D library allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
    D
    1
    star