PHP Classes
elePHPant
Icontem

Busca CEP: Get the address of a given CEP zip code in Brazil

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-06-27 (3 years ago) RSS 2.0 feedNot enough user ratingsTotal: 249 All time: 7,717 This week: 411Up
Version License PHP version Categories
busca-cep 0.1.3MIT/X Consortium ...5.4PHP 5, Web services, Geography
Description Author
This package is specific mainly for applications used in Brazil Brazil .

This class can get the address of a given CEP zip code in Brazil.

It can send an HTTP request to the Correios Web site to submit a form to get the address of a given CEP zip code.

The class parses the results page and extracts the zip code street, neighborhood, city and state.

In Portuguese:

Busca endereēos no site dos correios baseado no CEP

Name: Bruno Vaula Werneck <contact>
Classes: 1 package by
Country: Brazil Brazil
Age: 42
All time rank: 3840313 in Brazil Brazil
Week rank: 752 Up49 in Brazil Brazil Up

Details

BuscaCEP

Buscador de CEP

Classe que pesquisa CEP no site dos Correios e retorna o endereƧo completo se encontrar.

O retorno Ć© feito em JSON, assim:

{
    "Logradouro" : "Avenida, Rua, PraƧa, etc",
    "Bairro" : "Bairro",
    "Cep" : "12345678",
    "Cidade" : "Cidade",
    "UF" : "UF"
}

InstruƧƵes

InstalaĆ§Ć£o

composer require "brunowerneck/buscacep"

Ou edite seu composer.json e adicione

require : {
    "brunowerneck/buscacep" : "dev-master"
}

ExecuĆ§Ć£o

Para executar o sistema, basta chamar a classe:

> use BVW\Correios\BuscaCEP; > > $correios = new BuscaCEP(); > > $correios->busca($cep);

VocĆŖ pode pesquisar o CEP nos formatos 00000-000 ou 00000000

  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageBVW (1 directory)

  Files folder image Files  /  src  /  BVW  
File Role Description
Files folder imageCorreios (1 file)

  Files folder image Files  /  src  /  BVW  /  Correios  
File Role Description
  Plain text file BuscaCEP.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:249
This week:0
All time:7,717
This week:411Up