2017 © Pedro Peláez
 

library bpost-addresses

A php class for Bpost addresses validation API

image

ici-brussels/bpost-addresses

A php class for Bpost addresses validation API

  • Sunday, November 5, 2017
  • by aKKennedy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

bpost-addresses

A php class for Bpost addresses validation API, (*1)

bpost (Belgian Post Group) provides an API to validate belgian address : https://www.bpost.be/site/en/webservice-address., (*2)

The goal of this tool is to help querying the bpost API easily with PHP., (*3)

Install

The tool only requires PHP 7.0+ and guzzlehttp/guzzle., (*4)

Use it via composer + packagist: https://packagist.org/packages/ici-brussels/bpost-addresses, (*5)

Usage

$bpost = new Bpost_Address_Validation();

// Find relevant address according to input
/* Option 1: Structured */
$bpost->getAddress_Structured("Rue de la loix", "15", null, 1000, "Bruxelles");
/* Option 2: Unstructured */
$bpost->getAddress_Unstructured("rue de la loi 15, 1000 bruxelles");

// get array with validated address
$result = $bpost->getStructuredAddress();
print_r($result);
/*
Array
(
    [StreetName] => Rue De La Loi
    [StreetNumber] => 15
    [BoxNumber] => 
    [PostalCode] => 1040
    [MunicipalityName] => Bruxelles
    [CountryName] => Belgique
)
*/

// get array with latitude/longitude
$result = $bpost->getGeographicalLocation();
print_r($result);
/*
Array
(
    [lat] => 50.845465
    [lon] => 4.369107
)
*/

Credits

The Versions

05/11 2017

dev-master

9999999-dev

A php class for Bpost addresses validation API

  Sources   Download

MIT

The Requires

 

05/11 2017

0.1.7

0.1.7.0

A php class for Bpost addresses validation API

  Sources   Download

MIT

The Requires

 

04/11 2017

0.1.6

0.1.6.0

A php class for Bpost addresses validation API

  Sources   Download

MIT

The Requires

 

04/11 2017

dev-dev

dev-dev

A php wrapper for Bpost addresses validation API

  Sources   Download

MIT

The Requires

 

04/11 2017

0.1.5

0.1.5.0

A php wrapper for Bpost addresses validation API

  Sources   Download

MIT

The Requires

 

03/11 2017

0.1.0

0.1.0.0

A php wrapper for Bpost addresses validation API

  Sources   Download

The Requires