Solucionado!
el código final fue!
Código PHP:
Ver original<?php
if(isset($_SESSION["variables_form"]) && isset($_SESSION["variables_form_dw"]) && isset($_REQUEST["so"]) && isset($_REQUEST["file"])){ $variables_form = $_SESSION["variables_form_dw"];
$variables_form["so"] = $_REQUEST["so"];
$_SESSION["variables_form_dw"] = $variables_form;
$ip .= "". $_SERVER['REMOTE_ADDR'] ."";
$headers_fromUser = "From: ".$name."\r\n";
$headers_fromUser.= "Reply-To: ".$mail."\r\n";
$headers_fromUser.= "MIME-Version: 1.0\r\n";
$headers_fromUser.= "Content-Type: text/html; charset=UTF-8\r\n";
$message = "IP: ".$ip."<br /> Nombre: ".$name."<br />Apellidos: ".$apellidos."<br />Empresa: ".$empresa."<br />Teléfono: ".$telefono."<br />Email: ".$mail."<br />Nº PCs: ".$npeces."<br />Producto: ".$producto."<br />Sistema: ".$sistema;
$send = @mail("Totem Guard"." <[email protected]>\r\n","Descarga de software", $message, $headers_fromUser);
$url = $_REQUEST["file"];
$size = $head['Content-Length'];
$mime = array('application/octet-stream');
header('Content-Type: '.$mime); header('Content-Disposition: attachment; filename="'.$file.'"'); header('Content-Transfer-Encoding: binary'); header('Content-Length: '.$size);
// check for IE only headers
if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) { header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); } else {
}
if (!$send) {
}
}
else if(!isset($_REQUEST["producto_id"])){ $error_form = "Debe seguir todos los pasos para poder descargar el software. Debe volver a rellenar el <a href='http://www.xxx.com'>formulario</a>.";
}
?>