2017 © Pedro Peláez
 

library vies-address-formatter

Library to format data from VIES service (http://ec.europa.eu/taxation_customs/vies/?locale=en)

image

ankalagon/vies-address-formatter

Library to format data from VIES service (http://ec.europa.eu/taxation_customs/vies/?locale=en)

  • Friday, December 15, 2017
  • by piotrsuszalski
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1,528 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 39 % Grown

The README.md

Service can recognize postal_code, city and address (rest of address line) from address provided by VIES service (http://ec.europa.eu/taxation_customs/vies/?locale=en)., (*1)

Requirements

  • PHP5.3 and above

or, (*2)

  • PHP7.0 and above

Installation

Update your composer.json and run composer update, (*3)

``` json { "require": { "ankalagon/vies-address-formatter": "^1.0" } }, (*4)


or execute ``` bash composer require ankalagon/vies-address-formatter

Usage

``` php use Ankalagon\ViesAddressFormatter\ViesFormatter;, (*5)

$result = ViesFormatter::recognize("GB", "254 BANNERDALE ROAD<br>SHEFFIELD<br>S11 9FE");

print_r($result);

the above example will produce the following output: ``` php Array ( [city] => Sheffield [postal_code] => S11 9FE [address] => 254 Bannerdale Road )

Example address line recognizion

Iso Code Address line Return data
GB C/O BMW UK GROUPTAX FR-3-UK SUMMIT ONE SUMMIT AVENUE
FARNBOROUGH
GU14 0FB
Array (
    [city] => Farnborough
    [postal_code] => GU14 0FB
    [address] => C/o Bmw Uk Grouptax Fr-3-uk Summit One Summit Avenue
)
GB 28-29 THE BROADWAY
EALING
LONDON

W5 2NP
Array (
    [city] => London
    [postal_code] => W5 2NP
    [address] => 28-29 The Broadway Ealing
)
GB 10 THE GRANGEWAY
GRANGE PARK
LONDON
N21 2HA
Array (
    [city] => London
    [postal_code] => N21 2HA
    [address] => 10 The Grangeway Grange Park
)
GB 254 BANNERDALE ROAD
SHEFFIELD
S11 9FE
Array (
    [city] => Sheffield
    [postal_code] => S11 9FE
    [address] => 254 Bannerdale Road
)
PT R FIGUEIRAS N 616 MAIA
4475-011
MAIA
Array (
    [city] => Maia
    [postal_code] => 4475-011
    [address] => R Figueiras N 616 Maia
)
LU 40, RUE ANTOINE MEYER L-2153 LUXEMBOURG Array (
    [city] => Luxembourg
    [postal_code] => L-2153
    [address] => 40, Rue Antoine Meyer
)
NL EEKHORSTWEG 00031 A 7942KC MEPPEL Array (
    [city] => Meppel
    [postal_code] => 7942KC
    [address] => Eekhorstweg 00031 A
)
BE EZELSTRAAT 69 1 8000 BRUGGE Array (
    [city] => Brugge
    [postal_code] => 8000
    [address] => Ezelstraat 69 1
)
IT P.ZA FERRAVILLA N. 2 20092 CINISELLO BALSAMO MI Array (
    [city] => Cinisello Balsamo Mi
    [postal_code] => 20092
    [address] => P.za Ferravilla N. 2
)
BG ул. Самуиловско шосе №1А обл.СЛИВЕН, гр.СЛИВЕН 8800 Array (
    [city] =>
    [postal_code] => 8800
    [address] => ул. самуиловско шосе №1а обл.сливен, гр.сливен
)
AT Herrengasse 44
7471 Rechnitz
Array (
    [city] => Rechnitz
    [postal_code] => 7471
    [address] => Herrengasse 44
)
NO Setesdalsveien 76
4617 KRISTIANSAND S
Array (
    [city] => Kristiansand S
    [postal_code] => 4617
    [address] => Setesdalsveien 76
)
PL KORNELA UJEJSKIEGO 12 M7
30-102 KRAKÓW
Array (
    [city] => Kraków
    [postal_code] => 30-102
    [address] => Kornela Ujejskiego 12 M7
)
PL AL. 29 LISTOPADA 155C
31-406 KRAKów
Array (
    [city] => Kraków
    [postal_code] => 31-406
    [address] => Al. 29 Listopada 155c
)
PL AL. JERZEGO WASZYNGTONA 45/51
04-008 WARSZAWA
Array (
    [city] => Warszawa
    [postal_code] => 04-008
    [address] => Al. Jerzego Waszyngtona 45/51
)

Thanks to

Special thanks to Matthew Bednarski for postal-code.json library (https://gist.github.com/matthewbednarski/4d15c7f50258b82e2d7e). I use it (with small modfications) in this project., (*6)

The Versions

15/12 2017

dev-master

9999999-dev

Library to format data from VIES service (http://ec.europa.eu/taxation_customs/vies/?locale=en)

  Sources   Download

MIT

The Requires

  • php >=5.3

 

address vies addressing postal code postal code recognition

16/01 2016

1.0.2

1.0.2.0

Library to format data from VIES service (http://ec.europa.eu/taxation_customs/vies/?locale=en)

  Sources   Download

MIT

The Requires

  • php >=5.3

 

address vies addressing postal code postal code recognition

16/01 2016

1.0.1

1.0.1.0

Library to format data from VIES service (http://ec.europa.eu/taxation_customs/vies/?locale=en)

  Sources   Download

MIT

The Requires

  • php >=5.3

 

address vies addressing postal code postal code recognition

16/01 2016

1.0

1.0.0.0

Library to format data from VIES service (http://ec.europa.eu/taxation_customs/vies/?locale=en)

  Sources   Download

MIT

The Requires

  • php >=5.3

 

address vies addressing postal code vies vat