Found a Perl script on the internet that lets you query Google Maps with an address and get back a latitude and longitude.
However it does not work now as Google have changed their page format.
I would like this to work for both [url removed, login to view] & [url removed, login to view]
I want it to work from the command line and as a cgi for my webserver.
The output should be in the CSV format.
Latitude, Longitude, input query, laddr:, dtlsUrl:, svaddr:,
To be clear here are examples of inputs and output that I want to have.
Output: 40.597874,[url removed, login to view],11223,"Brooklyn, NY 11223", '/maps?q=11223&ie=UTF8&hl=en&latlng=&ei=hu0KRvbIEYW82ALRt9npCg',Brooklyn,NY,11223,US
Output: 51.600867,[url removed, login to view], HA7 1PD,“Stanmore, Greater London HA7 1PD”, '/maps?q=ha71pd&ie=UTF8&hl=en&sll=51.600867,-0.300364&sspn=0.006299,0.010141&latlng=&ei=YuUKRoH_EYbG2wK8ruzrCg',Stanmore, Greater London, HA7 1PD,UK
Input: 109 KNIGHTSBRIDGE SW1
Output: 51.501584,[url removed, login to view],109 KNIGHTSBRIDGE SW1, “109-125 Knightsbridge, Kensington And Chelsea, London SW1X”, '/maps?q=109+KNIGHTSBRIDGE+SW1&ie=UTF8&hl=en&sll=51.501584,-0.159805&sspn=0.006299,0.010119&latlng=&ei=7-gKRqT5D4S22AKN4cDnCg', 109-125 Knightsbridge, London, Greater London, SW1X 7RJ,UK,
Also when no results can be found, the output should be in the CSV format.
Latitude, Longitude, input query, Error message
0,0, 1 foobar road, No results found
For more information see [url removed, login to view]