למה להסתבך עם COOKIES ? כשאפשר לעשות זה הרבה יותר פשוט :
PHP קוד:
if ((!$_SESSION['last_search']) OR ($_SESSION['last_search']+10 > time()))
{
$_SESSION['last_search'] = time();
}
else if ($_SESSION['last_search']+10 <= time())
{
die('please try again in the next 10 seconds');
}
שימוש ב SESSIONS הכי בסיסי שיש..