https://github.com/ip2location/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.
https://github.com/ip2location/ip2location-activex
Last synced: 5 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/ip2location/ip2location-activex
- Owner: ip2location
- License: mit
- Created: 2020-07-01T07:24:29.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-12-31T02:47:47.000Z (7 months ago)
- Last Synced: 2026-02-01T13:47:23.685Z (6 months ago)
- Language: C
- Homepage:
- Size: 12.6 MB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IP2Location IP Geolocation ActiveX Component
This IP2Location IP Geolocation ActiveX Component allows user to query an IP address for useful IP geolocation info such as country, region or state, city, latitude and longitude, ZIP/Postal code, time zone, Internet Service Provider (ISP) or company name, domain name, net speed, area code, weather station code, weather station name, mobile country code (MCC), mobile network code (MNC) and carrier brand, elevation, usage type, address type, IAB category, district, autonomous system number (ASN), autonomous system (AS), AS domain, AS usage type and AS CIDR. This IP geolocation component uses **IP2Location BIN Data** file to lookup IP addresses and the binary data file can be downloaded at
* Free IP2Location IP Geolocation BIN Data: https://lite.ip2location.com
* Commercial IP2Location IP Geolocation BIN Data: https://www.ip2location.com/database/ip2location
## Requirements
Microsoft Visual Studio 2019 or later.
## Functions
Below are the functions supported in this class.
|Function Name|Description|
|---|---|
|LookUp(BINFile, IP)|Query IP address with the specified BIN file. This function returns the status for the query.|
## Result fields
Below are the result fields.
|Field Name|Description|
|---|---|
|CountryShort|Two-character country code based on ISO 3166.|
|CountryLong|Country name based on ISO 3166.|
|Region|Region or state name.|
|City|City name.|
|Latitude|City level latitude.|
|Longitude|City level longitude.|
|ZIPCode|ZIP code or postal code.|
|TimeZone|Time zone in UTC (Coordinated Universal Time).|
|ISP|Internet Service Provider (ISP) name.|
|Domain|Domain name associated to IP address range.|
|NetSpeed|Internet connection speed
- (DIAL) Dial-up
- (DSL) DSL/Cable
- (COMP) Company/T1
|IDDCode|The IDD prefix to call the city from another country.|
|AreaCode|A varying length number assigned to geographic areas for call between cities.|
|WeatherStationCode|Special code to identify the nearest weather observation station.|
|WeatherStationName|Name of the nearest weather observation station.|
|MCC|Mobile country code.|
|MNC|Mobile network code.|
|MobileBrand|Mobile carrier brand.|
|Elevation|Average height of city above sea level in meters (m).|
|UsageType|Usage type classification of ISP or company:
- (COM) Commercial
- (ORG) Organization
- (GOV) Government
- (MIL) Military
- (EDU) University/College/School
- (LIB) Library
- (CDN) Content Delivery Network
- (ISP) Fixed Line ISP
- (MOB) Mobile ISP
- (DCH) Data Center/Web Hosting/Transit
- (SES) Search Engine Spider
- (RSV) Reserved
|AddressType|IP address types as defined in Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6).
- (A) Anycast - One to the closest
- (U) Unicast - One to one
- (M) Multicast - One to multiple
- (B) Broadcast - One to all
|Category|The domain category is based on [IAB Tech Lab Content Taxonomy](https://www.ip2location.com/free/iab-categories). These categories are comprised of Tier-1 and Tier-2 (if available) level categories widely used in services like advertising, Internet security and filtering appliances.|
|District|District name.|
|ASN|Autonomous system number.|
|AS|Autonomous system.|
|ASDomain|Domain name of the AS registrant.|
|ASUsageType|Usage type of the AS registrant.|
|ASCIDR|CIDR range for the whole AS.|
## Usage
See the SampleCodes folder.