Skip to content

Instantly share code, notes, and snippets.

@diegofelix
Created February 20, 2018 12:04
Show Gist options
  • Save diegofelix/929681117d0730f5de66be13a3ead341 to your computer and use it in GitHub Desktop.
Save diegofelix/929681117d0730f5de66be13a3ead341 to your computer and use it in GitHub Desktop.
Find Postal Code From Correios
<?php
$client = new SoapClient("https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente?wsdl");
try {
var_dump($client->__getFunctions());
var_dump($client->__getTypes());
$resposta = $client->consultaCEP([
'cep' => '08220000',
]);
var_dump($resposta);
} catch (SoapFault $e) {
echo $e->getMessage();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment