i'm trying to do a form thing were people can send mail to me by filling out a forum. I also dont want people to spam me, so i want to make sure a visitor can only send mail to me every hour. How would i go about doing this? I have the following PHP coding so far..

PHP Code:
<?php

if (isset($_POST['name']) && isset($_POST['email']))
{

    
$name=$_POST['name'];
    
$email=$_POST['email'];
    
$caption=$_POST['caption'];

    
str_replace('\"','"',str_replace("'","'",$name));
    
str_replace('\"','"',str_replace("'","'",$caption));

    
$to="[email protected]";
    
$headers "From: $email\n";

    
$message="Name: $name\n\nEmail: $email\n\nCaption: $caption";

    if (!
$name || !$email || !$caption)
    {
        echo 
'You have left some areas blank.  Please fill out the form completely';
    }
    if(
mail($to,"Caption",$message,"$headers"))
    {
        echo 
"Name: $name
Email: 
$email
Caption: 
$captionz

 Thank you, 
$name, for your comment. ";
    }
    else 
    {
        echo 
"There was a problem sending the mail. Please contact The Webmaster if this problem persists.";
    }

}

else
{
    echo 
"To submit a Caption, please look under \"Create a Caption\" under the navigaiton";
}
?>
I just dont know how to do the ip time limit thing, can someone help?