Download the PHP package pragmarx/zipcode without Composer

On this page you can find all versions of the php package pragmarx/zipcode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zipcode

ZipCode

Latest Stable Version License

A Laravel WorldWide ZIP code searcher

You can use it in Laravel:

Or outside it:

It automatically renders a JSON if you try to access it as string, but you still can:

Select your preferred web service:

Get a web service by name, change things on it and find an address/city with it:

Create a new web service and add it to the list:

Change the user agent Guzzle will use to access the web service:

How much time it took to find a zip?:

Get a list of all available countries:

Dynamically change query parameters, so if you have a Geonames login, you can set it by doing:

Web Services

This package uses web services all around the world to provide addresses and cities information. There are at least 2 web services available to all countries (Brazil currently has 6), if ZipCode cannot access one or doesn't find a zip on it, it automatically falls back to the others. If you know of any other web services available that could be better than those, please create an issue or PR with it.

Result

This is an example of what you get when you search a Zip with it:

ZipCode returns a PragmaRX\ZipCode\Support\Result object and all properties can be accessed:

Laravel Form Example

This is an unconventionally hacked Laravel router which renders a form to query zips on a selected country:

Available countries

There are web services tested for the following countries:

If you need a different one, please ask or just send a pull request with it.

Requirements

Installing

Install it using Composer:

composer require "pragmarx/zipcode"

Edit your app/config/app.php and add the Service Provider

'PragmaRX\ZipCode\Vendor\Laravel\ServiceProvider',

And the Facade

'ZipCode' => 'PragmaRX\ZipCode\Vendor\Laravel\Facade',

Using It

Instantiate it directly

In Laravel you can use the IoC Container and the contract

Or Method Injection, in Laravel 5

About Geonames

This is a really nice service and you should use it as your first option, but for it to be free (for 30,000 credits/day) you have to create an user account and enable the free webservices. And configure ZipCode to use your username:

And you can also use config.php to set it:

Author

Antonio Carlos Ribeiro

License

ZipCode is licensed under the BSD 3-Clause License - see the LICENSE file for details

Contributing

Pull requests and issues are more than welcome.


All versions of zipcode with dependencies

PHP Build Version
Package Version
Requires pragmarx/support Version 0.9.0
guzzlehttp/guzzle Version ~4|~5|~6
illuminate/filesystem Version ~4|~5|~6
laravel/helpers Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pragmarx/zipcode contains the following files

Loading the files please wait ....