Skip navigation

A simple PHP script to display which data filtering functions are available with your version. When used properly these can help protect against certain web based attacks such as XSS, and helps perform simple input validation.

<?php ob_start();

$filters = '<h1>Data Filters</h1><table><tr>'
    . '<td><strong>Filter ID</strong></td>'
    . '<td><strong>Filter Name</strong></td></tr>';

foreach(filter_list() as $id =>$filter) {
    $filters .= '<tr><td>' . $filter . '</td><td>' . filter_id($filter) . '</td></tr>';
}
$filters .= '</table>';
echo $filters;
ob_flush();
?>

Leave a Reply