PHP code example of n0nag0n / fatfree-xss-filter

1. Go to this page and download the library: Download n0nag0n/fatfree-xss-filter 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/ */

    

n0nag0n / fatfree-xss-filter example snippets



// public/index.php for example. Wherever your framework entrypoint is.

use n0nag0n\Xss_Filter;

$f3 = Base::instance();

// Filter the POST globals on the hive of a FatFree object
$post = Xss_Filter::filter('POST');

// define routes, services, etc.

$f3->run();


// Additionally, filter whatever you'd like in controllers and such.
// $input_from_form = Xss_Filter::filterScalar($input_from_form_raw);