8000 GitHub - developmentstudio/address: Package for retrieval of information about dutch addresses.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

developmentstudio/address

8000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Address Information Package

This package is a client for easy retrieval of address information via the zip code API from http://www.postcodeapi.nu.

Installation

The recommended way to install this package is through Composer. Composer can be installed via the instructions below:

# Install Composer
curl -sS https://getcomposer.org/installer | php

Put the following content in the file composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url":  "git@github.com:developmentstudio/address.git"
        }
    ],
    "require": {
        "developmentstudio/address": "~0.1"
    }
}

Next, run the Composer command to install the latest stable version of this package:

composer.phar install

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

Usage example

define("POSTCODE_API_KEY", "Your API Key From postcodeapi.nu");

$address = PostcodeAPI::getAddressByZipCodeAndNumber("4205AZ", "1");

$street = $address->getStreet();          
echo $street;                                           // Stadhuisplein 1
echo $street->getName();                                // Stadhuisplein
echo $street->getNumber();                              // 1

$city = $address->getCity();                            
echo $city;                                             // Gorinchem

$province = $address->getProvince();      
eco $province;                                          // Zuid-Holland

$gps = $address->getGpsLocation();        
echo $gps;                                              // 51.8323,4.96453
echo $gps->getLatitude();                               // 51.8323
echo $gps->getLongitude();                              // 4.96453

License

Copyright (c) 2015, Development Studio Kevin van Cleef kevin@developmentstudio.nl

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

About

Package for retrieval of information about dutch addresses.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

0