Skip to content

Instantly share code, notes, and snippets.

@mushfiq
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mushfiq/171ea3e6620b7223fe9a to your computer and use it in GitHub Desktop.
Save mushfiq/171ea3e6620b7223fe9a to your computer and use it in GitHub Desktop.
This gist has a sample API call using PHP Google places API client.
<?php
require_once 'googleplaces.class.php';
$googlePlaces = new GooglePlaces(array(
'apiKey' => "YOUR_API_KEY"
));
$query['query'] = "Burger in Berlin";
$places = $googlePlaces->getLocationsByTextSearch($query);
$decoded_data = json_decode($places, true);
print_r($decoded_data);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment