PHP client to find Dutch addresses based on postal code and house number.
This library is based on the open geodata from https://nationaalgeoregister.nl.
Install the latest version via composer:
php composer.phar require eddypouw/geodata-postal-api
Example:
<?php
require_once('vendor/autoload.php');
$client = 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";
PHP 7.0.x or above.
This library is licensed under the MIT License - see the LICENSE file for details.