Parameter filtering
$sVariablesOrder = Ini_get (' Variables_order ');
$request = Array ();
Filtering unsafe data
for ($i = 0; $i < strlen ($sVariablesOrder); $i + +) {
$cVariableFlat = Strtolower ($sVariablesOrder [$i]);
Switch ($cVariableFlat) {
Case ' E ':
$filtered = Filter_input_array (input_env, filter_sanitize_special_chars);
Break
Case ' G ':
$filtered = Filter_input_array (Input_get, filter_sanitize_special_chars);
Break
Case ' P ':
$filtered = Filter_input_array (Input_post, filter_sanitize_special_chars);
Break
Case ' C ':
$filtered = Filter_input_array (Input_cookie, filter_sanitize_special_chars);
Break
Case ' s ':
$filtered = Filter_input_array (Input_server, filter_sanitize_special_chars);
Break
}
if (!empty ($filtered)) {
$request = Array_merge ($request, $filtered);
}
}
This article from "Smile" blog, reproduced please contact the author!