Read CSV and get google maps info

Discussion in 'Web Design and Development' started by carlosbutler, Nov 22, 2010.

  1. carlosbutler macrumors 6502a


    Feb 24, 2008
    London City
    I am trying to read a list of addresses from a CSV file, get that to pick up some info from google maps and then write to the CSV.

    I am writing a PHP file to do this, and this only has to happen once.

    I am doing it something like this:

    open csv file
    [INDENT]read while there is data[/INDENT]
    [INDENT][INDENT]get address and send request to google[/INDENT][/INDENT]
    [INDENT][INDENT]get response and store array received from google[/INDENT][/INDENT]
    [INDENT][INDENT]split up array[/INDENT][/INDENT]
    [INDENT]save the info received from google in to the csv (or another csv)[/INDENT]
    close csv file
    I am not sure on how to read the specific part of the line (which has 15 columns), send the request to google, and then write to the csv.

    Any help would be great :)
  2. lucidmedia macrumors 6502a

    Oct 13, 2008
    Wellington, New Zealand
    you have several problems to solve here... I would break a project like this into parts and start with the sending and receiving of data via the Google Maps API.

    reading and saving to a file are well documented and can be added in once you have the data flowing the way you want.

Share This Page