Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Instant Website: Realty/Listings/Auto:
User's IP Address/Location Using PHP?

 

 


cjnovak
User

Aug 16, 2009, 9:14 PM

Post #1 of 2 (3189 views)
Shortcut
User's IP Address/Location Using PHP? Can't Post

Hi!

I don't know if this has a simple solution or not, but I was hoping to be pointed in the right direction or get some advice/consultation on a question Cool

I am using the Instant Realty Website to power a real estate advertising magazine's website. Ideally there will be listings from all over the country in the database to populate the site's featured listings. My question is if there is an "easy" way to determine a user's geographical location from their IP address using PHP?

This information would then be used to populate a property relevant to the user's location on the front page, hopefully using some sort of $_GET or $_POST command, whether it be by city and state or zip code.

I've looked this up on Google and found information on geolocation services. If this is the only way to do it, we'll have to look into it. The only problem with this method is that I've been a PHP programmer and MySQL programmer for all of 2 weeks at this point!

Please let me know what kind of help I can get on this issue! Thanks!

P.S. Here is the link to our site as is (it is still very much under construction!)

http://www.travabond.com


Chris
Staff


Aug 17, 2009, 9:07 AM

Post #2 of 2 (3183 views)
Shortcut
Re: [cjnovak] User's IP Address/Location Using PHP? [In reply to] Can't Post

Hi cjnovak,

Yes, you'll need a third-party geolocation service to accomplish this feat. There are a few free ones floating around.

I googled a little and ran across GeoLite City. They seem to offer good documentation and have a forum for people who are having trouble getting things working.

Does anyone else have experience with any geolocation services?

Please let us know how things go, and best of luck! :D
Chris