0
I’m trying to make an application to get the data from cnpj in the IRS api. I can bring and print all the data via json, my problem is that I would like to print only one specific data, which in case would be the email field, how can I do this ?
Follow the api documentation link https://receitaws.com.br/api
header("Content-Type: text/plain");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.receitaws.com.br/v1/cnpj/" . $linha['cnpj']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$retorno = curl_exec($ch);
curl_close($ch);
$retorno = json_decode($retorno); //Ajuda a ser lido mais rapidamente
echo json_encode($retorno, JSON_PRETTY_PRINT);
If possible attach echo’s return, so the community can help you.
– LSA