Zdravím,
potřeboval bych impelmentovat do jednoduchého webového formuláře v php
antispamovou ochranu. Antispamovou ochranu si představuji takovou, že robot
vyplní všechná pole třeba do 5 vteřin a tím pádem ho neodešle na
uvedený email.
Formulář mám tady:
<?php
$hlaska = '';
if ($_POST) // V poli _POST něco je, odeslal se formulář
{
if (isset($_POST['first_name']) && $_POST['first_name'])
{
$to = "[email protected]"; // this is your Email address
$from = $_POST['email']; // this is the sender's Email address
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$subject = "Jmeno";
$subject2 = "Copy of your form submission";
$message = "Jméno<: " . $first_name . "\n\n" ;
$message2 = "Here is a copy of your message " . $first_name . "\n\n" .
$_POST['message'];
$headers = 'From: ladislav@volny.cz\r\n';
$headers .= "\nMIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/plain; charset=\"utf-8\"\r\n";
mail($to,$subject,$message,$headers);
mail($from,$subject2,$message2, $headers); // sends a copy of the message to
the sender
header('Location: nove-slovo-do-slovniku-odeslano.php');