Jump to content

Retrieving Location from IP address


lunny

Recommended Posts

Using an ip is never very accurate when it comes to determing the users exact location. The mechanism works as follows (in case you wish to implement it):

 

a new ip address is found and a user is requested, to type in his location, this can easily be done through registration (or whenever a user logs in, and his current ip does not match his previous), however most ISP's provide a dynamic ip address to their clients, so you see that the accuracy of the mechanism decreases

 

GeoIP for example contains about a few million addresses, and is more accurate then most systems, however you need to obtain a site license to use their software.

Link to comment
Share on other sites

Ok maybe I should explain why I want to do this first,

....

 

Im working a program to catch 'email snoopers', so we create a honeypot link, snooper visits link and we gather their IP address.

 

Now i just need a location, so as u can i cant really ask for their location in the registration

Link to comment
Share on other sites

the ip's come dynamically from the ISP, however they hold right to them... they all do have an area attached to them... which... indeed isnt infalable... but it would give you the area it comes from, the ISP name, security information, phone numbers, etc...

Link to comment
Share on other sites

The problem with the links specified (Which is what im looking for), is that I would have to send anyone using my application to this site. What I would ideally want is to report results from my page. I know I can't get as specific as the above site, but even retrieving just Country/City with PHP code is it possible ?

Link to comment
Share on other sites

well if you resolved the hostname then explode it and take the tld and compare it you could get the country

 

i.e.

 

 

user-1-test.nl if you exploded that then compare the extension (.nl) to a list of extensions, stored in an array

you would see its Netherlands,

 

a list of tlds is out there, and this would tell country-but not the area of the country-altho as mentioned before most arent very accurate when it gets to area of the country

 

 

map

Link to comment
Share on other sites

  • 1 year later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.