1. Go to this page and download the library: Download jossmp/datos-peru 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/ */
jossmp / datos-peru example snippets
sh
sh
new \jossmp\jne\rop(); // Registro de Organicaciones Politicas
$essalud = new \jossmp\essalud\asegurado();
$servir = new \jossmp\servir\servir();
//$mtc = new \jossmp\mtc\conductor(); //Miniterio de trasporte y comunicaciones
$dni = "44274795";
$search1 = $rop->consulta( $dni );
$search2 = $essalud->consulta( $dni );
$search3 = $servir->consulta( $dni );
if( $search1->success == true )
{
echo "Hola: " . $search1->result->nombres;
}
if( $search2->success == true )
{
echo "Hola: " . $search2->result->nombre;
}
if( $search2->success == true )
{
echo "Hola: " . $search3->result->nombre;
}