1
Hello,
I’m training this URL. Can you tell me why the following section doesn’t work?
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
$cURL = curl_init('http://fiesselecaoaluno.mec.gov.br/consulta/curso');
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
$dados = array(
'opcaoProcurar' => 'I',
'noIes' => '10',
);
curl_setopt($cURL, CURLOPT_POST, true);
curl_setopt($cURL, CURLOPT_POSTFIELDS, $dados);
curl_setopt($cURL, CURLOPT_REFERER, 'http://fiesselecaoaluno.mec.gov.br/consulta/curso');
$resultado = curl_exec($cURL);
curl_close($cURL);
echo $resultado;
?>
</body>
I wanted to get the html with Curl, but only dps of it have filled out the form correctly. Any hints?
Has something to do with the page form, or is it because it is ajax and Curl does not work for this ?
In what environment are you using this script?
– Carlos Rabelo
How is the HTML of the form?
– user3453562
I just reviewed the form and from what I saw, it is Ajax and would not accept the logic of the script you made.
– Carlos Rabelo
I was just going to enter the url to which forwards the post, thank you very much
– Mauricio Maletta