Nos arquivos de chamada para as templates subistituir
$parametros = array( 'idoferta' => $idoferta, 'nome_comment' => $nome_comment, 'email_comment' => $email_comment, 'comment' => $comment);
print_r($parametros);
$request_params = array(
'http' => array(
'method' => 'POST',
'header' => implode("\r\n", array(
'Content-Type: application/x-www-form-urlencoded',
'Content-Length: ' . strlen(http_build_query($parametros)),
)),
'content' => http_build_query($parametros),
)
);
$request = stream_context_create($request_params);
$template_dir = $INI["system"]["wwwprefix"]."/templates/envio_mensagem.php";
echo "===".$mensagem = file_get_contents($template_dir);
POR$query_string = "idoferta=$idoferta&nome_comment=$nome_comment&email_comment=$email_comment&comment=$comment";
if (!function_exists('curl_init')){
die('Sorry cURL is not installed!');
}$url = $INI["system"]["wwwprefix"]."/templates/envio_mensagem.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, count($kv));
curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string);curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);$mensagem= curl_exec($ch);
curl_close($ch);
Exemplo em enviaproposta.php