PHP code example of joulgs / php-cnpja
1. Go to this page and download the library: Download joulgs/php-cnpja 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/ */
joulgs / php-cnpja example snippets
bash
composer
php
use JGS\CNPJa\CNPJaInterface;
$token = 'your-token';
$cnpj = 'company cnpj to be consulted';
$company = new CNPJaInterface($token,$cnpj);
echo $company->getName();
echo $company->getResponse()->company->name;