i'm test this. Its my first time with unirest and mashape.
Code:
<?
require_once 'includes/unirest/Unirest.php';
$cpf = "MY CPF";
$response = Unirest\Request::get("https://consulta-situacao-cpf-cnpj.p.mashape.com/consultaSituacaoCPF?cpf=".$cpf,
array(
"X-Mashape-Key" => "MY SECRET KEY"
)
);
echo $response->raw_body;
?>
Result:
{"nome":"MY NAME","situacaoCadastral":"CPF STATUS"}
But, how i set a especific value ('nome') to a variable?
Like this:
MY NAME
Try this