cachesistemas/consultacpf

Consultar CPF no site da Receita Federal PHP

v1.0.2 2022-01-02 03:04 UTC

This package is auto-updated.

Last update: 2025-03-18 00:09:15 UTC


README

Instalando via composer

composer require cachesistemas/consultacpf

Exemplos de uso

imgRecaptcha.php
<?php 

include_once 'vendor/autoload.php';

use Cachesistemas\ConsultaCPF\ConsultaCPF;

$consulta    = new ConsultaCPF();

$result      = $consulta->imgRecaptchaCPF();

if ($result["status"]) {
    echo  '<img src="' . $result["img"] . '" style="width: 200px;">';
}
 
consultandoCPF.php
<?php

include_once 'vendor/autoload.php';

use Cachesistemas\ConsultaCPF\ConsultaCPF;

$consulta    = new ConsultaCPF();

$result      = $consulta->consultandoCPF('00000000000','dd/mm/YYYY', 'captcha');

echo json_encode($result); 
Exemplo retorno JSON
{
"status":true,
"cpf":"000.000.000-00",
"nome":"NOME COMPLETO",
"data_nascimento":"dd\/mm\/YYYY",
"situacao":"REGULAR"
}
☕ PIX
23.711.695/0001-15 

Contato