1. Go to this page and download the library: Download reliv/white-rat library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
reliv / white-rat example snippets
use Reliv\WhiteRat\Filter;
$filter = new Filter();
$rules = /* White-list rules go here; see further explanation below */;
// Optional safety check; throws an exception if $rules is not valid
$filter->validate($rules);
$subject = [/* Data to be filtered */];
$filteredSubject = $filter($subject, $rules);
use Reliv\WhiteRat\Whitelist;
$whitelist = new Whitelist([
/* White-list rules go here; see further explanation below */
/* The rules will be validated upon construction */
]);
$subject = [/* Data to be filtered */];
$filteredSubject = $whitelist($subject);