Example retrieve user location information based on IP

Satelize NodeJS module to retrieve user location information based on IP, combined with expressjs for instance make life easier to get some stuff as latitude/longitude of your visitor.

Download satelize

 

C:\Nodejs>npm install satelize

 

Example:

 

var satelize = require('satelize');

var ip = '115.78.13.12';

satelize.satelize({ip:ip}, function(err, payload) {

    console.log(payload);

});

 

Run :

 

C:\Nodejs>node getInforUseBasedIP.js

{ ip: '115.78.13.12',

  continent_code: 'AS',

  continent:

   { de: 'Asien',

     en: 'Asia',

     es: 'Asia',

     fr: 'Asie',

     ja: 'アジア',

     'pt-BR': 'Ásia',

     ru: 'Азия',

     'zh-CN': '亚洲' },

  country_code: 'VN',

  country:

   { de: 'Vietnam',

     en: 'Vietnam',

     es: 'Vietnam',

     fr: 'Vietnam',

     ja: 'ベトナム',

     'pt-BR': 'Vietnã',

     ru: 'Вьетнам',

     'zh-CN': '越南' },

  latitude: 19.8333,

  longitude: 105.25,

  timezone: 'Asia/Ho_Chi_Minh' }