PHP code example of omnilesolutions / ghanapostgps
1. Go to this page and download the library: Download omnilesolutions/ghanapostgps library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Ghana Code
$gpsName = 'GA-585-7449';
// Location contains center latitude and longitude as well as
// a box around the center. You also get postcode, region,
// area, street, etc.
$location = $gps->getLocation($gpsName);
$location = [
'lat' => 5.7525573723,
'lng' => -2.873287368
];
// The GPS info contains postcode, region, area and street info
// for the provided location.
$gpsInfo = $gps->getGps($location);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.