Jump to content


Photo

IP geolocation algorithms


  • Please log in to reply
8 replies to this topic

#1 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 2865 posts
  • Version:GM:Studio

Posted 10 July 2010 - 08:07 PM

In one of my day by day "would it be possible to..?" questions, i was wondering how the geolocation by IP algorithms work, and if it would be possible to make a system in GM for this ( i'm pretty sure that part can be done, i just cant find the algorithms anywhere.. )

It shouldn't be that complex, since there are thousand of websites that display IP tracing boxes, maps and that kind of things.


Solved! Here's the solution


Edited by manuel777, 22 July 2010 - 03:59 PM.

  • 1

#2 ~Dannyboy~

~Dannyboy~

    ~hoqhuue(|~

  • GMC Member
  • 2144 posts
  • Version:GM8

Posted 11 July 2010 - 04:55 AM

Isn't IP geolocation is more of a database look-up than an algorithm?
  • 0

#3 sabriath

sabriath

    12013

  • GMC Member
  • 3147 posts

Posted 11 July 2010 - 06:15 AM

The algorithms work by:

1. figuring out who you are by looking at your public IP address that was assigned to you
2. figuring out who assigned you that IP by looking at various registries, like ARIN, RIPE NCC, APNIC, LACNIC, AfriNIC, etc.
3. doing an extensive trace route to your location and timing hops between nodes and guessing their locations geographically
4. make a guess and have the person verify....verification can be used to make other searches more realistic.

Other things can be applied to help the algorithm, such as subnet mask binding (most ISPs will give out similar IP addresses in the same geolocation) or data mining (by using websites that ask for your location, like weather sites).
  • 0

#4 Yourself

Yourself

    The Ultimate Pronoun

  • Retired Staff
  • 7341 posts
  • Version:Unknown

Posted 11 July 2010 - 07:14 AM

Isn't IP geolocation is more of a database look-up than an algorithm?


Yes. There's no magic algorithm that takes a number and produces a location. It's entirely database lookup.

doing an extensive trace route


An 'extensive' trace route? How do you make a trace route 'extensive'?
  • 0

#5 sabriath

sabriath

    12013

  • GMC Member
  • 3147 posts

Posted 11 July 2010 - 07:35 AM

An 'extensive' trace route? How do you make a trace route 'extensive'?

A simple trace route will yield the hops, time and IP. An extensive one does it multiple times along with looking up each individual IP address it passes through for their respective possible geolocation/direction.

http://www.thefreedictionary.com/extensive

having a large extent, area, scope, degree, etc.

Meaning, in this instance, you don't just take the numbers for face value, but you actually do work on those numbers to figure more things out about them. And since packets can cross the internet in more than 1 way, the "degree" at which to do the trace route has increased...therefore extensive.

Albeit the fact that I was using it in an exaggerating manner, it still fits the context that you blatantly ripped at. Sometimes I feel that you snipe at me just because I'm me, whatever I have done...I'm sorry ok? GAWWHH! :P
  • 0

#6 Calle

Calle

    GMC Member

  • GMC Member
  • 689 posts

Posted 21 July 2010 - 11:24 AM

If you have a GPS-receiver hooked up to your computer which gives you the time of those satellites transmitting. Then it's only a matter of mathematics... in which case you'd need to a DLL to communicate the with the GPS-receiver though...

I haven't been around on these forums for some years, but perhaps by now someone has written a script to nicely parse json/xml in which case you could use this and a download DLL to work with Google's really awesome REST API for geolocation.

Edited by Calle, 21 July 2010 - 08:23 PM.

  • 0

#7 DanRedux

DanRedux

    GMC Member

  • GMC Member
  • 1332 posts
  • Version:GM:Studio

Posted 22 July 2010 - 02:44 AM

I see no valid reason for this, when related to GM.

If you want to know where the user lives, ask them.

Having a GM game spit out my location would scare the **** out of me and I'd close it, personally.

Edited by time4dan, 22 July 2010 - 02:44 AM.

  • 0

#8 sylvan

sylvan

    GMC Member

  • New Member
  • 99 posts

Posted 22 July 2010 - 03:23 AM

I see no valid reason for this, when related to GM.

If you want to know where the user lives, ask them.

Having a GM game spit out my location would scare the **** out of me and I'd close it, personally.

I could see it being used for a number of cool things. Like imagine if you use it in conjunction with the player's time, you could look up their daylight hours and perhaps have day/night transitions accurate to the player's area.
  • 1

#9 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 2865 posts
  • Version:GM:Studio

Posted 22 July 2010 - 03:54 PM

i solved it! Check this out! its an online highscores sistem i developed, it uses a GeoLiteCity database to check the users location based on its IP :)
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users