4168 shaares
2792 private links
2792 private links
ids PHP
"How to install the PHPIDS?
Add phpids/phpids to your composer.json and run php composer.phar update.
Copy vendor/phpids/phpids/lib/IDS/Config.ini.php to a different place and adjust the configuration settings according to your needs.
How to use it in my application?
You can use the following code to include the PHPIDS and have access to the result object:
use IDS\Init;
use IDS\Monitor;
require_once 'vendor/autoload.php';
$request = array(
'REQUEST' => $_REQUEST,
'GET' => $_GET,
'POST' => $_POST,
'COOKIE' => $_COOKIE
);
$init = Init::init('path/to/Config.ini');
$ids = new Monitor($request, $init);
$result = $ids->run();
if (!$result->isEmpty()) {
// Take a look at the result object
echo $result;
}"