library zippopotamus
A PHP library for Zippopotam.us API
zippopotamus/zippopotamus
A PHP library for Zippopotam.us API
- Sunday, March 30, 2014
- by tom_anderson
- Repository
- 1 Watchers
- 4 Stars
- 731 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 4 Forks
- 0 Open issues
- 2 Versions
- 1 % Grown
Zippopotamus PHP Library
A library to abstract the Zippopotamus API, (*1)
Installation
-
edit composer.json file with following contents:, (*2)
json
"require": {
"zippopotamus/zippopotamus": "dev-master"
}, (*3)
- install composer via
curl -s http://getcomposer.org/installer | php (on windows, download
http://getcomposer.org/installer and execute it with PHP)
- run
php composer.phar install
Use
use Zippopotamus\Service\Zippopotamus;
$result = Zippopotamus::code($countryCode, $postalCode);
$result = Zippopotamus::place($countryCode, $state, $city);
$result = Zippopotamus::nearby($countryCode, $postalCode);