Geolocation through IPs

A flash file that tracks global accessing of my site

Page 1 of 1

7 Replies - 3292 Views - Last Post: 27 May 2009 - 12:36 PM

#1 grimpirate  Icon User is offline

  • Pirate King
  • member icon

Reputation: 149
  • View blog
  • Posts: 714
  • Joined: 03-August 06

Geolocation through IPs

Posted 11 April 2007 - 08:17 PM

Before I start let me say that I have no idea how it is that latitude and longitude are determined from an IP address. I'm unsure if all methods use some sort of database, or if there's an actual way to determine the location based on the constituent numbers of the address. In any case, I found a website which allows you to type in an IP address and it provides the geographic data free of charge. So what I did was I used PHP to parse the content of this page into an array format and then store it in a database. Then another script turns it into a variable and passes the geographical information to a Flash file. Finally, this Flash file translates onto a globe the approximate positions of these regions. I just did this as a nifty little trick for tracking where people are accessing the main page of my software from. Thought someone might like to see it. Limitations: It only tracks the people that access the front page of my site, and it doesn't update dynamically. Sadly, the awardspace server won't allow me to use the PHP function file_get_contents() beyond the scope of the local URL. I'm forced to update the map's database files by hand.

Is This A Good Question/Topic? 0
  • +

Replies To: Geolocation through IPs

#2 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1876
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: Geolocation through IPs

Posted 11 April 2007 - 08:23 PM

I actually own the IP2Location database, used to use it for targetting jobs. I think I paid like $300 for it.
Was This Post Helpful? 0
  • +
  • -

#3 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: Geolocation through IPs

Posted 11 April 2007 - 08:28 PM

So....why is this in Flash & Actionscript instead of PHP?
Was This Post Helpful? 0
  • +
  • -

#4 grimpirate  Icon User is offline

  • Pirate King
  • member icon

Reputation: 149
  • View blog
  • Posts: 714
  • Joined: 03-August 06

Re: Geolocation through IPs

Posted 11 April 2007 - 08:41 PM

The end product is in flash. PHP parses, but Flash renders the data. I imagine it could fall into either one of the forums. :blink:
Was This Post Helpful? 0
  • +
  • -

#5 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: Geolocation through IPs

Posted 11 April 2007 - 08:50 PM

Well you didn't link to the flash, so I was wondering.
Was This Post Helpful? 0
  • +
  • -

#6 pioSko  Icon User is offline

  • still.dreaming
  • member icon

Reputation: 23
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03

Re: Geolocation through IPs

Posted 12 April 2007 - 09:34 AM

http://www.maxmind.com/

There is/was a free service which let you download a database of IP's and their location... PHP.net used to use it, but I think they use something else now.

Once you have that installed/working you just send the variable values to Flash using LoadVars and sendAndLoad().
Was This Post Helpful? 0
  • +
  • -

#7 grimpirate  Icon User is offline

  • Pirate King
  • member icon

Reputation: 149
  • View blog
  • Posts: 714
  • Joined: 03-August 06

Re: Geolocation through IPs

Posted 12 April 2007 - 10:49 AM

Yeah I looked at that but the database files are rather large, like 19MB or so is the country one, and the city one is significantly more I believe. Not to mention that the free versions weren't as accurate as the paid versions, there's some discrepancy there. I had already considered those things before I went with what I'm currently doing. More importantly my free server space is limited. It's just a shame I can't access beyond the scope of my URL. ::shrugs:: live and learn. I could likely employ javascript to that end, but I don't like to code with javascript on my pages. I like visitors to be able to surf onto my site with full confidence that if they disable javascript it will still work. My flash app uses LoadVars and it accesses a database which I create. It's just I have to create the database by hand. I don't mean literally opening a text editor, but by running another script on my local computer.
Was This Post Helpful? 0
  • +
  • -

#8 jfdonohoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-May 09

Re: Geolocation through IPs

Posted 27 May 2009 - 12:36 PM

View Postskyhawk133, on 11 Apr, 2007 - 07:23 PM, said:

I actually own the IP2Location database, used to use it for targetting jobs. I think I paid like $300 for it.


Skyhawk,

I saw your other thread about testing the IP2Location data base and I was wondering how accurate it is within the USA.

I have a client who is interested in geolocation by IP functionality but only if there is a very high probability of accuracy for the end user(like over 90%). I know that IP2Location claims a 99.9% accurate database but I don't know if that translates into a 99.9% accurate user experience.

We're not looking to specify down to the city/zip area which can be inaccurate due to the local ISP location. We're looking to more of a Metro area or State location.

Out of your personal testing did you come across any documentation/statistics that can help ease the "anxiety of inaccuracy"?

Thanks!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1