Download the PHP package kzykhys/portable-zipcode-api without Composer
On this page you can find all versions of the php package kzykhys/portable-zipcode-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kzykhys/portable-zipcode-api
More information about kzykhys/portable-zipcode-api
Files in kzykhys/portable-zipcode-api
Package portable-zipcode-api
Short Description Easy, portable, self-hosting Japan postal code API
License MIT
Informations about the package portable-zipcode-api
Portable ZipCode API
Easy, portable, self-hosting Japan postal code API
Live Example
Requirements
- PHP5.3.3 or later
- SQLite support (maybe installed on default PHP build)
- Latest jQuery
Installation
- Download portable-zip-api.zip
- Extract archive
- Upload zip.phar.php and zip.sqlite.db to same directory on your web server (eg.
http://www.example.com/API/zip.phar.php
)
If you prefer clean URLs, you'll need mod_rewrite and .htaccess files like this:
API Reference
General notes
- Every string passed to and from the API needs to be UTF-8 encoded.
- You can rename
zip.phar.php
to anything you like.
/version
Get version
URL
Return value
An object with mime type 'application/json'
/api
Get Javascript API
URL
Return value
The content of Javascript API with mime type 'text/javascript'
/search/{code}.{format}
Find an address by zip-code
URL
Arguments
- code (string/integer) The code to search (9999999/999-9999)
- format (string) The format (json|xml|php) Default:json
Return value
Format: json
An object with mime type 'application/json'
Format: xml
A xml document with mime type 'application/xml'
Format: php
A PHP serialized string with mime type 'text/plain'
JavaScript API
Configure and Paste the code above
Call the API through jQuery
Update address database
Download full source code from repository
Install dependencies via Composer
Download CSV (Lzh archive) from official website
Download lzh archive from http://www.post.japanpost.jp/zipcode/dl/kogaki.html
or just run
Extract Lzh archive
If you have lha command, just type
Setup database
Rebuild phar archive
Author
Kazuyuki Hayashi (@kzykhys)
LICENSE
The MIT License
All versions of portable-zipcode-api with dependencies
silex/silex Version 1.0.*@dev
symfony/console Version >=2.1,<2.3-dev
symfony/finder Version >=2.1,<2.3-dev
symfony/serializer Version >=2.1,<2.3-dev
doctrine/dbal Version >=2.2.0,<2.4.0-dev
doctrine/orm Version >=2.2.0,<2.4.0-dev
kzykhys/php-csv-parser Version dev-master