PHP Library for Google Geocoder
##Installation Add this line to you composer.json
"arunpoudel/php-google-geocoder" : "dev-master"
OR run
composer require arunpoudel/php-google-geocoder
##Usuage
<?php
require_once 'vendor/autoload.php';
$geoCoder = new GoogleGeoCoder\GeoCoder('YourKeyGoesHere');
$geoCoder->lookup([
'address' => 'Lagerveien 9, Stavanger'
])->then(function ($geoCollection) {
foreach ($geoCollection as $geoLocation) {
echo $geoLocation->getLatitude() . PHP_EOL;
echo $geoLocation->getLongitude() . PHP_EOL;
}
})->wait();