Download the PHP package optiosteam/belgian-region-zip without Composer
On this page you can find all versions of the php package optiosteam/belgian-region-zip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download optiosteam/belgian-region-zip
More information about optiosteam/belgian-region-zip
Files in optiosteam/belgian-region-zip
Package belgian-region-zip
Short Description PHP library for Belgian zip codes and cities per region/province
License MIT
Informations about the package belgian-region-zip
Belgian region zip codes
The data in this library is based on the public data provided by bpost (https://www.bpost.be/nl/postcodes).
Zip codes are ordered by region/province. For these regions the ISO 3166 code is used (https://www.iso.org/obp/ui/#iso:code:3166:BE)
Installation
Requirement: PHP version >=7.2
Description
This library contains 1 main class BelgianRegionZipHelper
with 3 static functions:
BelgianRegionZipHelper::getRegions()
returns all Belgian Regions/ProvincesBelgianRegionZipHelper::getZipCodesByRegionIsoCode(string $regionIsoCode)
returns all zip codes within a certain region/provinceBelgianRegionZipHelper::getMunicipalitiesByZipCode(string $zipCode, ?string $regionIsoCode = null, ?string $languageCode = null)
returns all municipalities for a certain zip code. Optionally you can pass the region and the language. NOTE: bpost only provides translations of municipalities in Brussels, for other regions the Dutch and French name are the same.
For more information on the data structure, you can look at the json data in src/Data
Examples
getMunicipalitiesByZipCode
returns:
returns:
getZipCodesByRegionIsoCode
returns:
Contributing
Feel free to submit pull requests for improvements & bug fixes.
MIT License
All versions of belgian-region-zip with dependencies
ext-json Version *