PHP code example of eddypouw / geodata-postal-api
1. Go to this page and download the library: Download eddypouw/geodata-postal-api 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/ */
eddypouw / geodata-postal-api example snippets
ent = new \GuzzleHttp\Client(['base_uri' => 'https://geodata.nationaalgeoregister.nl/geocoder/Geocoder']);
$geodata_api = new \Eddypouw\GeodataPostalApi\GeodataAddressRepository($client);
$response = $geodata_api->findByPostal('1509AW', 7);
print $response->getStreet() . ' ' . $response->getHouseNumber() . "\n";
print $response->getPostalCode() . ' ' . $response->getMunicipality() . "\n";