SproutCMS

This is the code documentation for the SproutCMS project

function checkLimitIP()

Check that a given event has only been hit by the request ip address an allowable number of times

Usage

bool RateLimit::checkLimitIP ( string $event , bool|null $success , int $limit , int $time );

Arguments

  1. string $event
    Event to check
  2. bool|null $success
    TRUE to check only successes, FALSE only failures, NULL all events
  3. int $limit
    Maximum number of events
  4. int $time
    Time to search, in seconds

Return value

  • bool
    TRUE if under the limit, FALSE if over the limit