Download the PHP
package dnomyar/php-rate-limiter without Composer
On this page you can find all versions of the php package
dnomyar/php-rate-limiter. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor dnomyar Package php-rate-limiter Short Description Simple rate limiter License
MIT
FAQ
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
This is a low budget rate limiter. Low budget because it does not require any additional tool to work. It uses the file system as a repository. It can be used to protect a public form from bots or limit by user.
The current implementation allows to atomically update the bucket. If another request is trying to update the save bucket at the same it will throw an Exception.
Usage
This library provides a RateLimiter class that need to be initialized with a identificator corresponding to the resources that need to be limited. For instance:
limit the number of submitions to a public page. In that case, the id could be business-description
limit the number of call per user. In that case, the id could be business-description-<user-id>
Limitation
If you are looking to use that for your project, use caution. This library was built to respect two important constraints: not using additionnal tool and a low level of parallel request for the same identificator.
Also, it would cause problems in case of a pick of load. It is advise to run load testing before using this library.
All versions of php-rate-limiter with dependencies
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package dnomyar/php-rate-limiter contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.