這個專案是由 Mosky <http://mosky.tw>
所開發的
ZIPCodeTW <https://github.com/moskytw/zipcodetw>
由 Python 轉換為 PHP 而來的.
此專案是以中華郵政 3+2 郵遞區號查詢頁 的資料為基礎。 除了查詢頁有的基本功能外,它還額外提供了以漸進或模糊地址的搜尋功能。 所以即使只有部分地址,還是可以查詢到全部或部分的郵遞區號。
Find ZIP code gradually:
.. code-block:: bash
$ php zipcodetw_cli.php
Please type your Address: 臺北市
Your 3+2 zipcode is: 1
Please type your Address: 臺北市信義區
Your 3+2 zipcode is: 110
Please type your Address: 臺北市信義區市府路
Your 3+2 zipcode is: 110
Please type your Address: 臺北市信義區市府路1號
Your 3+2 zipcode is: 11008
Please type your Address: 松山區
Your 3+2 zipcode is: 105
Please type your Address: 秀山街
Your 3+2 zipcode is:
Please type your Address: 台北市秀山街
Your 3+2 zipcode is: 10042
You can type Ctrl+C exit.
請先由 GitHub clone 回來, 進入資料夾後, 執行以下命令:
.. code-block:: bash
$ composer install
$ composer setup
$ composer start
之後開啟瀏覽器, 網址輸入 http://localhost:8888 即可.
Just install it and have fun. :)
The ZIP code directory is provided by Chunghwa Post, and is available from: http://www.post.gov.tw/post/internet/Download/all_list.jsp?ID=2201#dl_txt_s_A0206 https://www.post.gov.tw/post/download/Zip32_10907.xls
- In Ubuntu, must instll php-sqlite3, Ex: sudo apt-get install php-sqlite3
v0.0.2
1. 加入安裝時的問題排除.
2. 加入 phpunit 設定檔.
3. .phpunit.result.cache 加入忽略清單.
4. 匯入新資料.
v0.0.1
- 由 Python 版的 zipcodetw 版本 v0.6 改到 PHP 版本.