
15.02.2008, 21:57
|
|
Познавший АНТИЧАТ
Регистрация: 02.06.2006
Сообщений: 1,187
Провел на форуме: 6023777
Репутация:
2642
|
|
PHP код:
<?php
$array = array('union+select', '/*', '../');
$old_file_name = 'access.log';
$new_file_name = 'warn.txt';
$file = explode("\n", file_get_contents($old_file_name));
$newfile = array();
foreach($file as $str) {
foreach($array as $string) {
if(strpos($str, $string) === true) {
$newfile[] = $str;
break;
}
}
}
$file = fopen($new_file_name, 'w');
fwrite($file, implode("\n", $newfile));
fclose($file);
?>
$array - массив с подозрительными значениями.
Исис, о_О.
|
|
|