<?php
 
function checar1($pp) { 
	$pp =  strtoupper($pp);
	$p = checar($pp,"'");
	$p = checar($pp," DROP "); 
	$p = checar($pp," SELECT" ); 
	$p = checar($pp," AND "); 
	$p = checar($pp," OR "); 
	$p = checar($pp," INSERT "); 
	$p = checar($pp," INTO "); 
	$p = checar($pp," GROUP "); 
	$p = checar($pp," DELETE "); 
	$p = checar($pp," FROM "); 
	$p = checar($pp," AVG "); 
	$p = checar($pp," ALTER "); 
	$p = checar($pp," TABLE "); 
	$p = checar($pp," DATABASE "); 
	$p = checar($pp," COUNT "); 
	$p = checar($pp," CREATE "); 
	$p = checar($pp," WHERE "); 
	$p = checar($pp," NOT "); 
	$p = checar($pp," BETWEEN "); 
	$p = checar($pp," HAVING "); 
	$p = checar($pp," ORDER "); 
	$p = checar($pp," SUM "); 
	$p = checar($pp," MAX "); 
	$p = checar($pp," ALL "); 
	$p = checar($pp,";");
	$p = checar($pp,";");
}

function checar($v1, $v2) { 
		$p = strstr($v1,$v2); 
		if ($p){
			//echo $v1 . ' ' . $v2 . ' ' . $p;
			echo '<h2>SE DETECTO CODIGO MALICIOSO</h2>';
			echo '<meta content="20; url=cerrar.php" HTTP-EQUIV="REFRESH">';
			exit();
		}
	}
?>


