Download .zip |
Info | Documentation | View files (37) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2018-02-27 (2 months ago) | Not yet rated by the users | Total: 6 This week: 6 | All time: 9,218 This week: 89 |
Version | License | PHP version | Categories | |||
http-request-logger 1.0 | MIT/X Consortium ... | 5.6 | HTTP, PHP 5, Databases, Logging |
Description | Author | |
This package can store details about the HTTP request in a database. |
Save HTTP request information to the database.
This plugin is supported by PHP versions 5.6 or higher and is compatible with HHVM versions 3.0 or higher.
The preferred way to install this extension is through Composer.
To install HTTP Request Logger, simply:
$ composer require eliasis-framework/http-request-logger
The previous command will only install the necessary files, if you prefer to download the entire source code you can use:
$ composer require eliasis-framework/http-request-logger --prefer-source
You can also clone the complete repository with Git:
$ git clone https://github.com/eliasis-framework/http-request-logger.git
To use this plugin, your Eliasis application must use the PHP-Database library and add the following to the application configuration files:
/
* eliasis-app/config/complements.php
*/
return [
'plugin' => [
'http-request-logger' => [
'db-id' => 'app',
'db-prefix' => 'test_',
'db-charset' => 'utf8',
'db-engine' => 'innodb'
],
],
];
This will create the test_request
table and automatically save all HTTP requests.
The table structure created is as follows:
| request_id | request_ip | request_uri | request_protocol | request_method | request_referer | request_user_agent | request_http_state | request_load_time | created
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1
| 87.142.85.70
| /sample-app/
| HTTP/1.1
| GET
| http://www.google.es/
| Mozilla/5.0 (...)
| 200
| 0.008
| 2018-02-28 08:26:43
|
To run tests you just need composer and to execute the following:
$ git clone https://github.com/eliasis-framework/http-request-logger.git
$ cd http-request-logger
$ composer install
Run unit tests with PHPUnit:
$ composer phpunit
Run PSR2 code standard tests with PHPCS:
$ composer phpcs
Run PHP Mess Detector tests to detect inconsistencies in code style:
$ composer phpmd
Run all previous tests:
$ composer tests
If you would like to help, please take a look at the list of issues or the To Do checklist.
Pull requests
composer install
to install the dependencies.
This will also install the dev dependencies.composer fix
to excute code standard fixers.This project is licensed under MIT license. See the LICENSE file for more info.
2017 - 2018 Josantonius, josantonius.com
If you find it useful, let me know :wink:
Files |
File | Role | Description | ||
---|---|---|---|---|
config (5 files) | ||||
src (2 directories) | ||||
tests (2 files, 1 directory) | ||||
.editorconfig | Data | Auxiliary data | ||
.php_cs.dist | Example | Example script | ||
.travis.yml | Data | Auxiliary data | ||
CHANGELOG.md | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
CONDUCT.md | Data | Auxiliary data | ||
http-request-logger.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
phpcs.xml | Data | Auxiliary data | ||
phpmd.xml | Data | Auxiliary data | ||
README-ES.md | Doc. | Documentation | ||
README.md | Doc. | Documentation | ||
_config.yml | Data | Auxiliary data |
Files | / | config |
File | Role | Description |
---|---|---|
database.php | Aux. | Auxiliary script |
namespaces.php | Aux. | Auxiliary script |
server.php | Aux. | Auxiliary script |
set-hooks.php | Example | Example script |
tables.php | Aux. | Auxiliary script |
Files | / | src | / | Controller |
File | Role | Description | ||
---|---|---|---|---|
Exception (1 file) | ||||
Launcher.php | Class | Class source | ||
Request.php | Class | Class source |
Files | / | tests |
File | Role | Description | ||
---|---|---|---|---|
sample-app (2 directories) | ||||
bootstrap.php | Aux. | Auxiliary script | ||
PluginTest.php | Class | Class source |
Files | / | tests | / | sample-app | / | config |
File | Role | Description |
---|---|---|
complements.php | Aux. | Auxiliary script |
database.php | Aux. | Auxiliary script |
Files | / | tests | / | sample-app | / | plugins |
File | Role | Description | ||
---|---|---|---|---|
http-request-logger (1 file, 2 directories) | ||||
.plugins-states.json | Data | Auxiliary data |
Files | / | tests | / | sample-app | / | plugins | / | http-request-logger |
File | Role | Description | ||
---|---|---|---|---|
config (5 files) | ||||
src (2 directories) | ||||
http-request-logger.json | Data | Auxiliary data |
Files | / | tests | / | sample-app | / | plugins | / | http-request-logger | / | config |
File | Role | Description |
---|---|---|
database.php | Aux. | Auxiliary script |
namespaces.php | Aux. | Auxiliary script |
server.php | Aux. | Auxiliary script |
set-hooks.php | Example | Example script |
tables.php | Aux. | Auxiliary script |
Files | / | tests | / | sample-app | / | plugins | / | http-request-logger | / | src |
File | Role | Description | ||
---|---|---|---|---|
Controller (2 files, 1 directory) | ||||
Model (1 file) |
Files | / | tests | / | sample-app | / | plugins | / | http-request-logger | / | src | / | Controller |
File | Role | Description | ||
---|---|---|---|---|
Exception (1 file) | ||||
Launcher.php | Class | Class source | ||
Request.php | Class | Class source |
Files | / | tests | / | sample-app | / | plugins | / | http-request-logger | / | src | / | Controller | / | Exception |
File | Role | Description |
---|---|---|
RequestException.php | Class | Class source |
Files | / | tests | / | sample-app | / | plugins | / | http-request-logger | / | src | / | Model |
File | Role | Description |
---|---|---|
Request.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.