PHP code example of codeblog.pro / geo-location-address
1. Go to this page and download the library: Download codeblog.pro/geo-location-address 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/ */
codeblog.pro / geo-location-address example snippets
php
$location = new Location(
new Coordinates(55.75, 37.61),
new Country('Czechia', 'CZE'),
new Region('New Jersey', 'US-NJ'),
'Velka Ohrada',
'Wall Street',
'10005'
);
echo $location->getAddressString();
echo $location->toArray();