Locating your visitors
Posted: Sat Feb 26, 2005 8:34 pm
I'm currently in the early stages of creating a new website and want to be able to match my content to the visitors geographical location. This site is going to turn into the biggest project I've attempted and I certainly haven't tried to figure this out before so I was a little stuck.
I've done a bit of research and come up with three alternatives and just wanted to know if anyone else had attempted to tackle a similar problem, and if so hopefully point me in the best direction.
SmartGeek
This works by supplying the ip you're interested in to the smartgeek server as a get variable in a url. The file returned contains information on the location in the meta tags. This looks ok but you're reliant on their server meaning serving my pages may be slowed. I know it'll only be once for each visitor (I can then store the location in session variables or cookies) but I'm not sure if I want to go down this route.
www.tutorialized.com - Tutorial
I like this better. The tutorial walks you through querying a database that you can download to your own site from here. The data is on your own server so it should be faster. Probably need to update the database from time to time but assuming the quality of the data is similar to the smartgeek approach this looks a lot better.
There is also traceroute (I'm using PHP so perhaps thePEAR packages PEAR package?) but this is only half the story so I'm not sure about this. Having done a traceroute on my ip I wouldn't know how to convert that into a geographical location.
If anyone else has attempted this or knows or other/more/better resources I would be very interested.
Archived topic from Iceteks, old topic ID:3136, old post ID:25632
I've done a bit of research and come up with three alternatives and just wanted to know if anyone else had attempted to tackle a similar problem, and if so hopefully point me in the best direction.
SmartGeek
This works by supplying the ip you're interested in to the smartgeek server as a get variable in a url. The file returned contains information on the location in the meta tags. This looks ok but you're reliant on their server meaning serving my pages may be slowed. I know it'll only be once for each visitor (I can then store the location in session variables or cookies) but I'm not sure if I want to go down this route.
www.tutorialized.com - Tutorial
I like this better. The tutorial walks you through querying a database that you can download to your own site from here. The data is on your own server so it should be faster. Probably need to update the database from time to time but assuming the quality of the data is similar to the smartgeek approach this looks a lot better.
There is also traceroute (I'm using PHP so perhaps thePEAR packages PEAR package?) but this is only half the story so I'm not sure about this. Having done a traceroute on my ip I wouldn't know how to convert that into a geographical location.
If anyone else has attempted this or knows or other/more/better resources I would be very interested.
Archived topic from Iceteks, old topic ID:3136, old post ID:25632