27/11/2004, 04:32
|
| | Fecha de Ingreso: noviembre-2004
Mensajes: 27
Antigüedad: 19 años, 5 meses Puntos: 0 | |
hola.. puede funcionar así también.. solo agregando dos líneas.. Código PHP: $header = "MIME-Version: 1.0\r\n"; $header .= "Content-type: text/html; charset=iso-8859-1\r\n"; Código PHP: <? $auth_domain = array("xxxxxx.com","xxxxxx.com"); $to = "[email protected]"; $subject = "comentarios"; if (isset($HTTP_REFERER)) { foreach ($auth_domain as $line) { if (eregi($line,$HTTP_REFERER)) { $check_url = 1; continue; } } }else{ $check_url = 1; } if ($check_url != 1) { echo "error=this formmail is not allowed in your domain"; exit; } $date = getdate(time()); $date = sprintf("%s %s %s %s:%s:%s", $date["mday"],$date["month"],$date["year"],$date["hours"],$date["minutes"],$date["seconds"]); $from = "$name<$email> "; // -- estas dos lineas -- $header = "MIME-Version: 1.0\r\n"; $header .= "Content-type: text/html; charset=iso-8859-1\r\n"; // -- fin -- $header = "From:$from\n"; $header .= "Reply-To:$from\n"; $body = "El siguiente comentario ha sido enviado por: \n"; $body .= "$name el $date\n\n"; $body .= "---------------------------------------------------------------\n\n"; $body .= "Nombre del fan: \n"; $body .= "$name\n\n"; $body .= "Correo electronico: \n"; $body .= "$email\n\n"; $body .= "comentarios: \n"; $body .= "$comentarios\n\n"; $body .= "---------------------------------------------------------------\n\n"; $body .= "<Hosting remoto> $REMOTE_HOST\n"; $body .= "<Dirección remota> $REMOTE_ADDR\n"; $body .= "<Agente usado> $HTTP_USER_AGENT\n"; $header=trim($header); mail($to, $subject, $body, $header) or die("error=No se pudo enviar el mensaje!"); header ("Location: http://www.xxxxx.com/carpeta/gracias.htm"); exit; |