PHP code example of tecactus / reniec-php

1. Go to this page and download the library: Download tecactus/reniec-php 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/ */

    

tecactus / reniec-php example snippets


  // incluir el autoloader de vendor
  $reniecDni = new Tecactus\Reniec\DNI('tu-token-de-acceso-personal');
   
  print_r($reniecDni->get('12345678'));
   
  // para devolver el resultado como un array pasar 'true' como segundo argumento.
  print_r($reniecDni->get('20131312955', true));
   
bash
   composer 
json
   "...
       "tecactus/reniec-php": "2.*"
       ...
   }