Definition

flood_register_event($name)
drupal-cvs/includes/common.inc, line 1142

Description

Register an event for the current visitor (hostname/IP) to the flood control mechanism.

Parameters

$name The name of an event.

Code

<?php
function flood_register_event($name) {
  db_insert('flood')
    ->fields(array(
      'event' => $name,
      'hostname' => ip_address(),
      'timestamp' => REQUEST_TIME,
    ))
    ->execute();
}
?>