An open API service indexing awesome lists of open source software.

https://github.com/recca0120/twzipcode

正規化台灣地址,並取得縣市、鄉鎮、區碼
https://github.com/recca0120/twzipcode

php taiwan zip zip3 zip5 zipcode

Last synced: about 1 month ago
JSON representation

正規化台灣地址,並取得縣市、鄉鎮、區碼

Awesome Lists containing this project

README

        

# TWZIPCODE 3 + 2

[![Total Downloads](https://poser.pugx.org/recca0120/twzipcode/d/total.svg)](https://packagist.org/packages/recca0120/twzipcode)
[![Latest Stable Version](https://poser.pugx.org/recca0120/twzipcode/v/stable.svg)](https://packagist.org/packages/recca0120/twzipcode)
[![Latest Unstable Version](https://poser.pugx.org/recca0120/twzipcode/v/unstable.svg)](https://packagist.org/packages/recca0120/twzipcode)
[![License](https://poser.pugx.org/recca0120/twzipcode/license.svg)](https://packagist.org/packages/recca0120/twzipcode)
[![Monthly Downloads](https://poser.pugx.org/recca0120/twzipcode/d/monthly)](https://packagist.org/packages/recca0120/twzipcode)
[![Daily Downloads](https://poser.pugx.org/recca0120/twzipcode/d/daily)](https://packagist.org/packages/recca0120/twzipcode)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/recca0120/twzipcode/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/recca0120/twzipcode/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/recca0120/twzipcode/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/recca0120/twzipcode/?branch=master)

```php
require __DIR__.'/vendor/autoload.php';

use Recca0120\Twzipcode\Zipcode;

$zipcode = Zipcode::parse('台北市中正區中華路1段25號');
echo $zipcode->zip3(); // 100
echo $zipcode->zip5(); // 10043;
echo $zipcode->county(); // 臺北市
echo $zipcode->district(); // 中正區
echo $zipcode->address(); // 臺北市中正區中華路1段25號
echo $zipcode->shortAddress(); //中華路1段25號
```