setcookie("lastsubmittime",time(),time()+3600,"/",".dailyplug.com",0);
Put that in the part where they submit it (make sure its with the other header() functions or at the top of the page).
Then check it:
// Number of seconds between plugs
$floodtime=30;
$time=time()-$floodtime;
$lastsubmittime=(isset($_COOKIE['lastsubmittime']) ? $_COOKIE['lastsubmittime'] : '0');
if ($lastsubmittime > $time) {
$timeleft=$lastsubmittime-$time;
die("You can only plug every <b>".$floodtime."</b> seconds, you can plug again in <b>".$timeleft."</b> seconds.");
}
Put that before the plug action 😉