Category: Programming

The Best Ways to Get a User's Location in JavaScript

The Best Ways to Get a User’s Location in JavaScript

Geolocating your website’s users can be useful for a wide variety of purposes. For example, you may want to show a different version of your website to users in different localities. You may be trying to better understand where your users live so you can tailor your website to better suit their needs. Or, maybe your website can only function in certain areas.


Whatever your reasons, geolocating your users and knowing where they’re coming from can be useful.


Introducing Command-line Real-time & Historic WHOIS Tool

Introducing Command-line Real-time & Historic WHOIS Tool

We are really excited to announce that we are now offering our hallmark Whois via a command-line utility, “bestwhois”. This tool can be a great alternative to the standard “whois” command for domain and IP WHOIS queries, as there are no search restrictions and the queries are made through the API service provided by Whois XML API.


Most suitable for UNIX power users and other command-line enthusiasts, bestwhois, is a cross-platform utility that works on Microsoft, Linux, Unix, Mac OS X or any other platform with Python. It is command-line front-end to Whois XML API; WHOIS API and WHOIS History API. All the queries initiated from your end are processed through these APIs, and the output is similar to that of the original “whois” command.

Machine Learning and IP Geolocation

The Collaboration Between Machine Learning and IP Geolocation

The scientific study of statistical models and algorithms used by computer systems to perform specific tasks without human involvement and explicit instructions, machine learning (ML) uses inference and patterns to be able to work on its own.


Different from traditional computation, ML allows the computer to perform a more advanced analysis of data without a human supervising. Human operators provide the computer with initial data, instructing their analytical software to detect specific information or provide answers to vaguely formulated questions.

How to Perform a GeoIP Lookup in Express.js

If you’re building a website (or API) using Express.js, it’s often useful to know where your visitors are coming from: the US, the EU, someplace else? The process of locating a web user is typically referred to IP geolocation, and unfortunately, it isn’t simple.

The reason it isn’t easy to get IP geolocation data is that there is no standard mapping of IPs -> location data. Most companies get this data by purchasing it from GeoIP aggregators that piece together lots of different bits of information to build an accurate database of IP geolocation data.

GeoIP data is typically comprised of:

How to Perform a GeoIP Lookup with Node.js

In this article, I’m going to walk you through the best possible way to find the physical location of an IP address using Node.js (also known as IP geolocation).

Unfortunately, there is no standard way to figure out where an IP address is physically located. Instead, companies referred to as GeoIP providers aggregate many different pieces of data together to build an accurate database of IP location data.

GeoIP data is typically comprised of:

  • Domain WHOIS data?(which itself must be aggregated by data providers)
  • Regional Internet Registries, which hand out large blocks of IP addresses to various Internet Service Providers around the world (ISPs)