use:
Код:
<?php include ('ime.php'); ?>
добавляем в страницу допустим в index.php .
ime.php:
Код:
<?php $queryString = strtolower($_SERVER['QUERY_STRING']); if (strstr($queryString,"<") OR strstr($queryString,">") OR strstr($queryString,"(") OR strstr($queryString,")") OR strstr($queryString,"..") OR strstr($queryString,"%") OR strstr($queryString,"*") OR strstr($queryString,"+") OR strstr($queryString,"!") OR strstr($queryString,"@")) { $loc = $_SERVER['PHP_SELF']; $ip = $_SERVER['REMOTE_ADDR']; $date = date ("d-m-Y @ h:i:s"); $lfh = "log.txt"; $log = fopen ( $lfh,"a+" ); fputs ($log, "Attack Date: $date | Attacker IP: $ip | QueryString: $loc?=$queryString\n"); fclose($log); echo "Your attack have been saved!"; } ?>