PHP code example of bureaupartners / extract-address-from-text
1. Go to this page and download the library: Download bureaupartners/extract-address-from-text 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/ */
bureaupartners / extract-address-from-text example snippets
use BureauPartners\ExtractAddressFromText\AddressExtractor;
$extractor = new AddressExtractor($address['text']);
$extractor->getAddress(); // Get all information
$extractor->getRecipient();
$extractor->getStreet();
$extractor->getHouseNumber();
$extractor->getHouseNumberAddition();
$extractor->getPostalCode();
$extractor->getCity();
$extractor->getCountry()['code'];