function ValidarDatos($campo){
//Array with possible headers to be used by a spammer
$badHeads = array("Content-Type:",
"MIME-Version:",
"Content-Transfer-Encoding:",
"Return-path:",
"Subject:",
"From:",
"Envelope-to:",
"To:",
"bcc:",
"cc:");
//Check that the data is not one of
//the strings in the array. If any are found is
//leads to a Forbidden page
foreach($badHeads as $valor){
if(strpos(strtolower($campo), strtolower($valor)) !== false){
header( "HTTP/1.0 403 Forbidden");
exit;
}
}
}
//Calls to the function example
ValidarDatos($_POST['name']);
ValidarDatos($_POST['location']);
ValidarDatos($_POST['email']);
ValidarDatos($_POST['reason']);
ValidarDatos($_POST['comment']);
?>
Very stable
layout
design
creativity
teaching
copy