承接 weha/bpost-addresses 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

weha/bpost-addresses

最新稳定版本:0.1.9

Composer 安装命令:

composer require weha/bpost-addresses

包简介

A php class for Bpost addresses validation API

README 文档

README

A php class for Bpost addresses validation API

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

The goal of this tool is to help querying the bpost API easily with PHP.

Install

The tool only requires PHP 7.0+ and guzzlehttp/guzzle.

Use it via composer + packagist: https://packagist.org/packages/ici-brussels/bpost-addresses

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

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-24