phool4fool
203.***.***.***Get rid of magic_quotes_gpc
This is a fast and easy way for getting rid of magic_quotes_gpc. Just include this piece of code in the beginning of your script and later you won't have to bother whether magic_quotes_gpc is on or off, it will be the same as off.PHP Example:
PHP code:
if (get_magic_quotes_gpc()) {
function traverse (&$arr) {
if (!is_array($arr))
return;
foreach ($arr as $key => $val) {
if (is_array($arr[$key]))
traverse($arr[$key]);
else
$arr[$key] = stripslashes($arr[$key]);
}
}
$gpc = array(&$_GET, &$_POST, &$_COOKIE);
traverse($gpc);
}