PHP code example of devmobgroup / postcodes-providers

1. Go to this page and download the library: Download devmobgroup/postcodes-providers 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/ */

    

devmobgroup / postcodes-providers example snippets


use DevMob\Postcodes\Providers\PostcodeApiNu\PostcodeApiNu;

$provider = new PostcodeApiNu([
    'key' => 'YOUR_API_KEY',
]);
$address = $provider->lookup('3011ED', '50');

use DevMob\Postcodes\Providers\ApiPostcode\ApiPostcode;

$provider = new ApiPostcode([
    'token' => 'YOUR_TOKEN',
]);
$address = $provider->lookup('3011ED', '50');