1
I wonder what the function is for http_build_query
in php.
I read the manual, but it was vacant for me.
It is correct to use it within this context?
$cURL = curl_init('http://teste');
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
$dados = array(
'NMCLIENTE' => $nome_lead,
'DSEMAIL' => $email_lead,
'NRTELEFONE' => $telefone_lead,
'DSINTERESSE' => $meio_captacao,
'DSMENSAGEM' => $mensagem
);
curl_setopt($cURL, CURLOPT_POST, true);
curl_setopt($cURL, CURLOPT_POSTFIELDS, http_build_query($dados));
$resultado = curl_exec($cURL);
curl_close($cURL);
Here are the examples in the manual.
– Jorge B.