-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsqli.php
More file actions
30 lines (26 loc) · 694 Bytes
/
sqli.php
File metadata and controls
30 lines (26 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
function sqli($poster) {
$poster = trim($poster);
//this line needs mysql connection
$poster = mysql_real_escape_string($poster);
if(get_magic_quotes_gpc())
{
$poster = stripslashes($poster);
}
$poster = strip_tags($poster);
$poster = str_replace(array("\n", "'", "‘", "’", "'", "“", "”", "„", "?", '"'), array("", "\’", "\’", "\’", "\’", "\"", "\"", "\"", "\"", "\""), $poster);
return $poster;
}
while (list($Key, $Val) = each($_POST)) {
if (substr($Key, 0, 4) != "fsk_") {
if (is_array($Val) === true) {
while (list($sKey, $sVal) = each($Val)) {
$Val[$sKey] = sqli($sVal);
}
$_POST[$Key] = $Val;
} else {
$_POST[$Key] = sqli($Val);
}
}
}
?>