ip-geolocation

How does IP geolocating work?

自古美人都是妖i 提交于 2019-11-28 05:41:33
I'm not looking for a service that does this. I'm just curious as to how geolocation works. Mapping IP addresses to geolocations is done via tables, where an IP maps to a particular location. This location, however, does't need to be accurate, since IP addresses don't carry any information about their locations, these are approximated . From http://en.wikipedia.org/wiki/Geolocation_software : The primary source for IP address data is the regional Internet registries which allocate and distribute IP addresses amongst organizations located in their respective service regions: American Registry

How does geographic lookup by IP work?

廉价感情. 提交于 2019-11-28 04:23:26
Is which IPs are assigned to which ISPs public information? How do geo IP services obtain this information and maintain this information? How can I personally figure out where a certain IP belongs without using one of these services? Alnitak For what it's worth, I worked at a senior level in the ISP industry for more than a decade so I have quite some experience with this. Large IP ranges are allocated as needed by IANA to each of the Regional Internet Registries . The regions are generally continental in size - IP addresses are not assigned on a per-country basis. The RIRs in turn then

Getting a user country name from originating IP address with Ruby on Rails

非 Y 不嫁゛ 提交于 2019-11-28 03:02:28
I want to extract a user country name from visitors' IP addresses. I could get the IP address with remote_ip . But what could be the easiest way to get the country name? It doesn't have to be super accurate. Any ruby library (gem or plugin) to do this? I want an simple and easy solution for this. You can use geoip gem. environment.rb config.gem 'geoip' Download GeoIP.dat.gz from http://www.maxmind.com/app/geolitecountry . unzip the file. The below assumes under #{RAILS_ROOT}/db dir. @geoip ||= GeoIP.new("#{RAILS_ROOT}/db/GeoIP.dat") remote_ip = request.remote_ip if remote_ip != "127.0.0.1"

How to know Geographic location from an IP address

不问归期 提交于 2019-11-27 15:25:12
问题 I have created a login application in jsp/servlet in my web project and I want to know about the geographic locations of different users those access my login page. How can I know that a person is accessing my login page from where? For example: If a person is accessing a page from Canada then a record will be inserted into my database such as : IP: 20.4.9.134 and location: Canada. 回答1: I use this: http://freegeoip.net/xml/122.169.8.137 Or http://www.geoplugin.net/xml.gp?ip=xx.xx.xx.xx Easy

How to get city name based on IP address in java?

醉酒当歌 提交于 2019-11-27 14:54:48
Is it possible to know the city name based on IP address in java? are you using jsp or what ? for city name over client side you can use google's API which will return you the geographical details of the user mapped with the IP. As google's documentation say you can get the following When populated, the google.loader.ClientLocation object is populated with the following metro-level granularity properties: * ClientLocation.latitude — supplies the low resolution latitude associated with the client's IP address * ClientLocation.longitude — supplies the low resolution longitude associated with the

Need a client side API for determing geo location of IP addresses

China☆狼群 提交于 2019-11-27 14:53:11
I need a client side API in either Java or Ruby. I would much prefer need this to be LOCAL only. Infact this might not even be an IP, but more of a database import. The thing is that I cannot make use of a web service based one as that is too much heavy I/O for me. Note: By geolocation, all I really need is country/region at best. I would accept actual lat/long cordinates as well. I was looking at these guys a couple months ago: http://www.maxmind.com/app/geolitecountry It seemed OK, for my limited purposes. a quick google search yielded this result: http://www.hostip.info/dl/index.html I

Ip address to country with database [closed]

旧城冷巷雨未停 提交于 2019-11-27 14:16:36
问题 I have downloaded ip-to-country.csv that has ip ranges that are mapped to countries. How should I store this data to database and how can I query in what range Ip address is to know where Ip address is coming from? 回答1: I wrote a small lib called ip2c to do just that. it uses the database from webhosting.info but also supports that from Software77. It converts the CSV info a compact binary format and can do the search straight on the file, in memory or in a memory mapped file. The Java API

getting users geolocation via html5 and javascript

邮差的信 提交于 2019-11-27 13:05:46
问题 I am trying to get the users geolocation via the html5 geolcation api, and i use the following snippet for it: if (navigator.geolocation) { var timeoutVal = 10 * 1000 * 1000; navigator.geolocation.getCurrentPosition( displayPosition, displayError, { enableHighAccuracy: true, timeout: timeoutVal, maximumAge: 0 } ); } else { // DO SOME STUFF HERE } function displayPosition(position) { // configuration var myZoom = 12; var myMarkerIsDraggable = true; var myCoordsLenght = 6; var defaultLat =

How does geographic lookup by IP work?

核能气质少年 提交于 2019-11-27 05:19:34
问题 Is which IPs are assigned to which ISPs public information? How do geo IP services obtain this information and maintain this information? How can I personally figure out where a certain IP belongs without using one of these services? 回答1: For what it's worth, I worked at a senior level in the ISP industry for more than a decade so I have quite some experience with this. Large IP ranges are allocated as needed by IANA to each of the Regional Internet Registries. The regions are generally

How does IP geolocating work?

主宰稳场 提交于 2019-11-27 01:00:46
问题 I'm not looking for a service that does this. I'm just curious as to how geolocation works. 回答1: Mapping IP addresses to geolocations is done via tables, where an IP maps to a particular location. This location, however, does't need to be accurate, since IP addresses don't carry any information about their locations, these are approximated . From http://en.wikipedia.org/wiki/Geolocation_software: The primary source for IP address data is the regional Internet registries which allocate and