View file game/inc/fun.php

File size: 612B
<?php

class filter {

public function html_filter($input) {

$text = preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $input);
$text = preg_replace('/[<>]/', '', $text);

        if(!get_magic_quotes_gpc()) {
        $text = addslashes($text);
        }
$badwords = array('input', 'union', 'script', 'select', 'update', 'script', 'www', 'http', '.ru');
        $text = str_replace($badwords, '', $text);

return $text;

}
public function latin($input) {

        if(preg_match('/[^a-zA-z0-9_]/i', $input)) {
        return true;
        } else {
        return false;
        }
}


}
?>