Retrieving location from IP Address

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lunny
Forum Newbie
Posts: 13
Joined: Mon Feb 19, 2007 8:33 am

Retrieving location from IP Address

Post by lunny »

Hi guys,

My query is as follows i have IP address stored in variable and would like to know how to find out the location of the IP address. And how close can i actually get as in Country/City/..

Im working on a project called email snooper, in which we set traps for ''snoopers'' and gather their IP address.

What I would like is to then display to location of the snooper to users who set up to the trap. I know there is many services out there that do this, but again I would like to display results such as Country/City on my page.

Is there any free IP databases out there and methods etc ?

Thanks
mentor
Forum Contributor
Posts: 100
Joined: Sun Mar 11, 2007 11:10 am
Location: Pakistan

Post by mentor »

lunny
Forum Newbie
Posts: 13
Joined: Mon Feb 19, 2007 8:33 am

Post by lunny »

Ah yes nice links...I managed to get country back from IP address but still struggling with City.

I downloaded the GeoLite City Database but not sure how to retrieve city from this given IP address, anyone here with any experience ?
Post Reply