PHP code example of nexconnect / dgii-consultas

1. Go to this page and download the library: Download nexconnect/dgii-consultas 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/ */

    

nexconnect / dgii-consultas example snippets


use NexConnect\DgiiConsultas\Listado;

$listado = new Listado();
$listado->actualizar();                 // descarga el listado si cambió; solo esto usa la red
$c = $listado->buscar('990-00000-1');   // null si no está
if ($c !== null) {
    echo $c->razon_social, ' ', $c->estado, ' ', $c->fecha_listado->format('Y-m-d');
}