PHP code example of paradisesessions / cep
1. Go to this page and download the library: Download paradisesessions/cep library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
paradisesessions / cep example snippets
$cep = new \ParadiseSessions\Cep\Cep();
if (!$cep->consult('04538133')) {
exit($cep->fail()->getMessage());
}
var_dump($cep->data());
echo "<p>Address: {$cep->address} {$cep->complement}, {$cep->city} - {$cep->state}</p>";
echo "<p>Zip code: {$cep->format()}";