PHP code example of api-postcode / php-client

1. Go to this page and download the library: Download api-postcode/php-client 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/ */

    

api-postcode / php-client example snippets

 bash
$ composer 
 php
$token = 'secret-token';
$client = new ApiPostcode\Client\PostcodeClient($token);

$address = $client->fetchAddress('1082MD', 34);

$address->getStreet();      // Claude Debussylaan
$address->getCity();        // Amsterdam
$address->getHouseNumber(); // 34
$address->getZipCode();     // 1082MD
$address->getLatitude();    // 52.3377074
$address->getLongitude();   // 4.8719565