Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-07-04 (9 months ago) ![]() | Not enough user ratings | Total: 25 | All time: 11,257 This week: 45![]() |
Version | License | PHP version | Categories | |||
ratelimit-codeignite 1.0 | MIT/X Consortium ... | 5 | Networking, HTTP, PHP 5, Security |
Inspired by: https://github.com/alexandrugaidei/ratelimit-codeigniter-filebased
This hook allows you to block ip addresses for a period of time based on a number of pre-established requests.
Inside the config directory in the config.php file enable the use of hooks:
// application/config/config.php
$config['enable_hooks'] = TRUE;
Inside the config directory in the hooks.php file add the code below:
// application/config/hooks.php
$hook['post_controller_constructor'] = array(
'class' => 'ratelimit',
'function' => 'limit_all',
'filename' => 'ratelimit.php',
'filepath' => 'hooks'
);
Lastly copy and paste the hatelimit.php file into the hooks folder
// application/hooks
How changes should be made within the file: application/hooks/ratelimit.php
// Number of Requisitions
$max_requests = 100;
// Time it will be locked (seconds)
$sec = 300;
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Doc. | Documentation |
![]() |
/ | application |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Forbidden access page. |
![]() |
/ | application | / | config |
File | Role | Description |
---|---|---|
![]() ![]() |
Conf. | Configuration script |
![]() ![]() |
Conf. | Configuration script |
![]() ![]() |
Doc. | Documentation |
![]() |
/ | application | / | hooks |
File | Role | Description |
---|---|---|
![]() ![]() |
Data | Forbidden access page |
![]() |
Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
![]() | ratelimit-codeignite-2024-07-04.zip 9KB |
![]() | ratelimit-codeignite-2024-07-04.tar.gz 7KB |
![]() | Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.