Assign JSON value to PHP array from Google Maps API request

I am trying to find a way to assign a JSON value to return to the Google Map API when passing an address. I would search Google, but I’m only a few months deep in PHP and really don’t know which keywords to use. I don’t even know what is JSON?

In any case, I found this article that explains how to request Google Maps with an address and return its GPS location. When I checked it in my browser, text will appear. I just don’t know what to use to display and display the browser for an object in a PHP page.

This is a Google Maps request:

http://maps.google.com/maps/geo?q="ADDRESS"&output=csv&oe=utf8

This is my function where I want to use this:

//Queries Google Map API with an address and assigns the returned GPS Location 
//to this Object
public function build_me($this_address)
{
    //Builds the query from the address array to send to the Goole Maps API
    $query = $this_address["Line1"].",".$this_address["Line2"].",".
             $this_address["City"].",".$this_address["State"].",".$this_address["Zip"];

    //Location_Array = http://maps.google.com/maps/geo?q=$query&output=csv&oe=utf8
    $this->latitude  = //Location_Array['Something'];
    $this->longitude = //Location_Array['Something'];
}

This is the article I mean: http://martinsikora.com/how-to-get-gps-coordinates-from-an-address

: ? ? , - !

+3
1

URL- CSV ( output=csv). , (Downing Street 10):

200,8,45.9797693, -66,5854067

:

+4

All Articles