data: {
action: 'genkey',
email: $('#input-5').val(),
id: $('#api_key_id').val(),
},
<div class="название">слово_которое_нужно выделить</div>
$time_interval = 1;#In seconds
$fast_request_check = ($_SESSION['last_session_request'] > time() - $time_interval);
if (!isset($_SESSION)){
session_start();
$_SESSION['last_session_request'] = time();
$_SESSION['request_cnt'] = 1;
}elseif($fast_request_check && ($_SESSION['request_cnt'] < LIMIT_REQ_API_COUNT)) {
# This is fast, consecutive request, but meets max requests limit
$_SESSION['request_cnt']++;
}elseif($fast_request_check){
# This is fast, consecutive request, and exceeds max requests limit - kill it
$str = Controller::response(false, array('code' => 1, 'description' => getMessage('Many_request_api')));
exit($str); ;
}else{
# This request is not fast, so reset session variables
$_SESSION['last_session_request'] = time();
$_SESSION['request_cnt'] = 1;
}