- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
# Alternative mysql_real_escape_string without mysql connection
function escape_string($param) {
if(is_array($param))
return array_map(__METHOD__, $param);
if(!empty($param) && is_string($param)) {
return str_replace(array('\\', "\0", "\n", "\r", "'", '"', "\x1a"), array('\\\\', '\\0', '\\n', '\\r', "\\'", '\\"', '\\Z'), $param);
}
return $param;
}
#Using example
$name = @trim(escape_string(stripslashes($_POST['name'])));
https://gist.github.com/wilnaweb/ca37459bdf92aa74bd2dd7994fa5b0df
urinoterapevt 09.09.2020 23:59 # 0
MAKAKA 10.09.2020 21:00 # −1
3_dar 11.09.2020 18:34 # +2
Fike 12.09.2020 22:50 # +1
defecatinho 12.09.2020 23:49 # 0
https://govnokod.ru/25635
guest8 11.09.2020 05:45 # −999