How to access geocode values with php

24 views
Skip to first unread message

Chooha Mouse

unread,
Oct 17, 2011, 6:10:58 PM10/17/11
to google-map...@googlegroups.com
Right now I have the geocoded values as I requested through javascript. What i need to do is store these values in my database to save users request so i can refer to these values at a later date.

The problem is that I cannot write a file to the server with javascript because its client-side, but i also dont know how to request this data with php. 
Is there a way to store the JSON or XML file received after sending the request or a way to request geocode information for V3 with php?

Thanks,

Shiva

Rossko

unread,
Oct 17, 2011, 8:35:19 PM10/17/11
to Google Maps JavaScript API v3
> Right now I have the geocoded values as I requested through javascript. What
> i need to do is store these values in my database to save users request so i
> can refer to these values at a later date.

First you need to read the terms of use before storing copies of
Google's data

> The problem is that I cannot write a file to the server with javascript
> because its client-side, but i also dont know how to request this data with
> php.

This is normal AJAX activity, nothing to do with maps. You are
correct that you cannot request data from php, the normal approach is
to get your client script to send data to a php script which in turn
does whatever is wanted server-side.

> a way to request geocode information for V3 with php?

http://code.google.com/apis/maps/documentation/geocoding/
Reply all
Reply to author
Forward
0 new messages