![]() Will return a full list of countries information if country code not provided. Provide a ISO 3166 country code to get the country information in array. Function NameĮxpect a IP2Location Country Information CSV file. Translate IPv6 address from decimal number into hexadecimal address.Ĭonvert IPv4 range into a list of IPv4 CIDR notation.Ĭonvert IPv4 CIDR notation into a list of IPv4 addresses.Ĭonvert IPv6 range into a list of IPv6 CIDR notation.Ĭonvert IPv6 CIDR notation into a list of IPv6 addresses.īelow is the description of the functions available in the Country class. Translate IPv6 address from hexadecimal address to decimal format. Translate IPv4 address from decimal number to dotted-decimal address. Translate IPv4 address from dotted-decimal address to decimal format. Verify if a string is a valid IPv6 address. Verify if a string is a valid IPv4 address. Return remaining credit of the web service account.īelow is the description of the functions available in the IP Tools class. You can get a full list of IAB content taxonomy category from here.īelow is the description of the functions available in the Web Service lookup. Return the IAB content taxonomy category of IP address or domain name. Return the IP address type (A-Anycast, B-Broadcast, M-Multicast & U-Unicast) of IP address or domain name. Return the ISP's usage type of IP address. Return average height of city above sea level in meters (m). Please visit Mobile Carrier Coverage to view the coverage report. Return the nearest weather observation station name.Ĭommercial brand associated with the mobile carrier. Return the nearest weather observation station code. Return the IDD prefix to call the city from another country. Please see Internet Connection Type for details. Return the UTC time zone (with DST supported). Return the city longtitude of the IP address. Return the city latitude of the IP address. Please visit ISO3166-2 Subdivision Code for the information of ISO3166-2 supported Return the ISO3166-2 region name of the IP address. Return the ISO3166-1 country name of the IP address. Return the ISO3166-1 country code (2-digits) of the IP address. Return the geolocation information in array. Open the IP2Location BIN data for lookup. BIN Databaseīelow is the description of the functions available in the BIN Database lookup. This will help in various situation, such as serving correct content to your visitor in your website, or to validate the order received from your customer.You can check the sample.py file to learn more about usage. For example, you can identify where is the IP address located, and who is the owner of the IP address. You can then make use of the geolocation data. Throughout this article, you have learn how to use the IP2Location Deno module to query the geolocation information of an IP address. You will see the result showing up like the screenshot below: ![]() In your terminal, enter the following command to run the script: deno run -allow-env -allow-read query_ip.js.Create a new js file called query_ip.js in your project root folder, copy the following piece of code into the file, and change the “YOUR_DATABASE_PATH” to the database you have obtained earlier:.You can download a free database from or purchase a commercial database from. You will also need the IP2Location BIN database. Installationīefore we start, you will need to download the latest release from, unzip it and copy the mode.ts file and /src folder into your project root folder. You will learn how to use the IP2Location Deno module and the IP2Location BIN database to query the geolocation information of an IP address. In this article, we are going to guide you on how to use IP2Location in Deno. For example, user can import a geolocation module to query the geolocation information of a particular IP address. In addition, Deno supports the import of third party modules to be use in the script. User can just install and run without any worries. Deno had been distributed as a single executable without any dependencies needed. It’s built based on the V8 JavaScript engine and Rust programming language. Deno is a runtime designed for JavaScript, TypeScript, and WebAssembly languages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |