How would i turn a GPS cord into a address with Php and Mysql?

December 18, 2010 – 3:37 pm

I want to build a site similar to foursquare. I know with JavaScript on a iPhone i can get the GPS Cord and pass it to Php. I know i would need a database or api with the latitude and longitude with the address linked to it. Can i buy a database or any good api’s to get this data? Never messed with Location data before but wrote other web apps before.

Related posts:

  1. How do I turn my computer into a web server for simply testing my website. I need mysql and perl to run too?
  2. What is a good application for designing a MySQL-driven website on Mac OS X?
  3. How do I connect to MySQL with PHP remotely?
  4. how to check IP address of own computer in LAN using fedora 8?
  5. Is there any issues with regards to importing an old wordpress mysql database to a new one?
  6. How do I upload a php-mysql site with filezilla?
  7. How to connect my simple website to a mysql database?
  8. How do you download a .php file from its location using the browser address bar?
  9. How would I write code in Java to read a html page from the internet and execute javascript within it?
  10. What are mySQL databases and how do i use them?
  1. One Response to “How would i turn a GPS cord into a address with Php and Mysql?”

  2. Google is your friend ;-)

    Look at the page returned by this URL:
    http://maps.google.com/maps/api/geocode/xml?latlng=37.4219720,-122.0841430&sensor=false

    You should be able to do an HTTP request from your PHP to Google, then parse the XML (Or you can get the result in JSON, if that’s easier). Or, skip your PHP back end altogether, and just do the lookup from Javascript in your app directly to Google. If your PHP code has nothing to add to the result, there’s no reason for the extra trip to your server.

    If latlng is coming from a GPS, you should probably set sensor=true…although I still haven’t figured out why that one matters.

    Also, read the terms of service, yada yada (second link). I doubt they are strictly enforced, but try to stick to them.

    By Ratchetr on Dec 18, 2010

Sorry, comments for this entry are closed at this time.