Download the PHP package mistralys/errorcode-incrementor without Composer

On this page you can find all versions of the php package mistralys/errorcode-incrementor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

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.
Please rate this library. Is it a good library?

Informations about the package errorcode-incrementor

Error code / counter incrementor

Simple PHP script that increments a counter when accessed, and the displays the current count.

Can also be used programmatically when used as a project's composer dependency.

Installation

Configuration

Password

The counter is password protected to avoid someone hogging the server in a DOS attack, since it causes a write operation on the hard drive, and can thus create a heavy system load in such a context.

Even if this seems like a trivial operation, take care to choose a good password.

The counters list

The counters array in config-local.php is very simple. Let's say you have two applications for which you want to maintain error code counters, called "Mistral" and "Tramontane" (Wind names). The counters list would look like this:

Note: There is no limitation on the characters used in the names - you can safely use UTF8 and special characters if you wish.

Update delay

See Security > Minimum update delays.

Quick start

To start checking counter values, point your browser to where the script is located, and use the following GET parameters:

Both will display the current value of the selected counter.

Security

Minimum update delays

To mitigate DOS attacks or avoid spamming the counters, an update delay is enforced between incrementing counters. By default, it is only possible to increment a counter every 10 seconds.

The absolute minimum is enforced at 1 second.

Note: The delay works separately for each counter, and is only used when incrementing.

HTTPS recommended

Since the counter uses a password, it is a bad idea to use it over HTTP, as it is relatively easy to intercept the password in the requests. Use a webserver with an SSL certificate, and serve the script using an HTTPS connection.

Error handling

The script will send an HTTP status code when something goes wrong, with a descriptive status text.

Possible errors:

Accessing counters programmatically

The Counters class can be used independently of serving the counters via HTTP requests. This means that you can simply require this package as a dependency in your project, and use the Counters class there.

Getting a counter value

Incrementing a counter

Fetching available counters


All versions of errorcode-incrementor with dependencies

PHP Build Version
Package Version
No informations.
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 mistralys/errorcode-incrementor contains the following files

Loading the files please wait ....