gabrielfs7 / google-location
Get location using google web services
Installs: 1 701
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 2
Open Issues: 1
Requires
- php: >=5.5
Requires (Dev)
- phpunit/phpunit: 4.0.x
This package is auto-updated.
Last update: 2024-10-27 01:09:58 UTC
README
Retrieve location data from Google using PHP
<?php $coordinates = (new \GSoares\Google\Location\CoordinatesLocator()) ->setStreet('Marechal Rondon') ->setNumber('998') ->setDistrict('Barreiros') ->setCity('Sao Jose') ->setState('Santa Catarina') ->setPostcode('88117030') ->setCountry('Brasil') ->locate(); //OR using single parameters... $coordinates = (new \GSoares\Google\Location\CoordinatesLocator()) ->setPostcode('88117030') ->locate(); /* RETURNS: object(GSoares\Google\Location\Address\Coordinates)#6 (2) { ["latitude"]=> string(11) "-27.5818202" ["longitude"]=> string(11) "-48.6039563" } */ ?>
Requirements
- PHP 5.4+