Skip to content

Commit

Permalink
Create kabanos.php
Browse files Browse the repository at this point in the history
  • Loading branch information
flenczewski committed Jun 10, 2014
1 parent 3fa2c70 commit 67a1f9c
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions kabanos.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* Kabanos
*
* Funkcjonalność
* ~~~~~~~~~~~~~~
*
* a. zliczanie ilości requestów w funckji czasu (1h, 24h)
* b. automatycznie blokowanie (na określony czas) po przekroczeniu granicznych wartośći
* c. próba identyfikacji użytkownika (anonimowego)
*
* Konfiguracja
* ~~~~~~~~~~~~
*
* $type = array('limit' => array(10 => 5, 60 => 10, 3600 => 20) );
* $type - typ obiektu
* limit
* 10 sek - 5 req
* 60 sek - 10 req
* 3600 sek - 20 req
*
*
* @author Fabian Lenczewski <fabian.lenczewski@gmail.com>
* @since 2014-06-10
*/
class Kabanos
{
const KEY_PREFIX = 'banos';

// pobranie konfiguracji bazy danych
private static function _getDb()
{
}

// próba identyfikacji użytkownika
private static function _getFingerprint()
{
}

// pobranie limitów
// public static function getConfig()
// {
// }


// weryfikacja + większenie licznika
public static function check($user = null, $type = null, $config = null)
{
}


}

0 comments on commit 67a1f9c

Please sign in to comment.