Hi, now I am looking for php code that limit for long post after a specified period. so example that after click the send button it will be able to send again after x time long,, this is use for send email to friend. I would appreciate if anyone who gives instructions, this is use for send email to friend.
Something like this might work. Place on the form page session_start(); $_SESSION["last_email_time"] = time(); PHP: Place before you grab the variables sent from the form session_start(); if(isset($_SESSION["last_email_time"])){ $_SESSION["current_time"] = time() - $_SESSION["last_email_time"]; } if($_SESSION["current_time"] < 60){ // 60 seconds echo("You can't Email more than once every 60 seconds."); exit; } PHP: Not tested and might need tweaking, it depends on your form action
Still confuse what do you need. Are you want to automatically send to some email within some time? You can cron job for that task. If you use cpanel on your hosting, choose cron job.