note 3562 deleted from strip_tags by ronabop

From: Date: Fri, 11 Aug 2000 15:51:38 +0000
Subject: note 3562 deleted from strip_tags by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-1214@lists.php.net to get a copy of this message
Generic PHP code to make any PHP script safe against cross system scripting attacks: if(is_array($HTTP_POST_VARS)) { reset($HTTP_POST_VARS); while (list($key, $val) = each($HTTP_POST_VARS)) { $HTTP_POST_VARS[$key] = strip_tags($val); $$key = strip_tags($val); } } if(is_array($HTTP_GET_VARS)) { reset($HTTP_GET_VARS); while (list($key, $val) = each($HTTP_GET_VARS)) { $HTTP_GET_VARS[$key] = strip_tags($val); $$key = strip_tags($val); } } if(is_array($HTTP_COOKIE_VARS)) { reset($HTTP_COOKIE_VARS); while (list($key, $val) = each($HTTP_COOKIE_VARS)) { $HTTP_COOKIE_VARS[$key] = strip_tags($val); $$key = strip_tags($val); } }

« previous php.notes (#1214) next »