simpledev / geofinder
Geofinder find geolocation in jpeg photos metadata
dev-master
2019-02-15 12:44 UTC
Requires
- php: ^7.1
Requires (Dev)
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2024-10-09 02:36:29 UTC
README
This package can find latitude and longitude from jpeg photos metadata.
Installation
You can install the package via composer:
composer require simpledev/geofinder:dev-master
Usage Example
use Simpledev\Geofinder\Geofinder; if(!empty($_FILES['photo'])) { $photo = $_FILES['photo']; $finder = new Geofinder(); $coords = $finder->getCoords($photo['tmp_name']); var_dump($coords); //return array(2) { ["latitude"]=> float(47.977730555556) ["longitude"]=> float(-4.4286277777778) } or false if geolocation not found if($coords){ $lat = $coords['latitude']; //get latitude $lng = $coords['longitude']; //get longitude //do something with latitude and longitude } }
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
PHP Package Boilerplate
This package was generated using the PHP Package Boilerplate.