1. Go to this page and download the library: Download rkr/postcodes 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/ */
rkr / postcodes example snippets
$provider = new \Kir\PostCodes\PostCodeProvider();
echo $provider->getPostCodeFromIso3166('DE');
$provider = new \Kir\PostCodes\PostCodeProvider();
echo $provider->getIso3166CodeFromPostCode('D');
$provider = new \Kir\PostCodes\PostCodeProvider();
echo implode(', ', $provider->getAllIcuCodes());
$provider = new \Kir\PostCodes\PostCodeProvider();
echo implode(', ', $provider->getAllPostCodes());
$provider = new \Kir\PostCodes\PostCodeProvider();
print_r($provider->getIcuCodesToPostcodes());
$provider = new \Kir\PostCodes\PostCodeProvider();
print_r($provider->getPostcodesToIcuCodes());
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.