Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (9) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-07-04 (Yesterday) | Not yet rated by the users | Total: 11 This week: 11 | All time: 11,333 This week: 6 |
Version | License | PHP version | Categories | |||
ratelimit-codeignite 1.0 | MIT/X Consortium ... | 5 | Networking, HTTP, PHP 5, Security |
Description | Author | |
This package can block computer IP addresses that access many times. |
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;
Files |
File | Role | Description | ||
---|---|---|---|---|
application (2 files, 2 directories) | ||||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Files | / | application |
File | Role | Description | ||
---|---|---|---|---|
config (3 files) | ||||
hooks (2 files) | ||||
.htaccess | Data | Auxiliary data | ||
index.html | Data | Forbidden access page. |
Files | / | application | / | config |
File | Role | Description |
---|---|---|
config.php | Conf. | Configuration script |
hooks.php | Conf. | Configuration script |
index.html | Doc. | Documentation |
Files | / | application | / | hooks |
File | Role | Description |
---|---|---|
index.html | Data | Forbidden access page |
ratelimit.php | Class | Class source |
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.