Ну если в файле есть название то код теоретика отвечает всем твоим требованиям.
Только его надо немного модифицировать:
/////////////////////////////////////////////////////
//
// File searcher by The0ReTiC
// mail me to
l0g_err@xakep.ru in any questions
//
////////////////////////////////////////////////////
$mytext = "simple text"; // Текст для поиска
$dirt = opendir($DOCUMENT_ROOT.\'samples\\texts\'); // Папка со статьями
while($file_handler = readdir($dirt))
{
if (($file_handler !=\'.\')&&($file_handler != \'..\')):
echo\'Parsing file: \'.$file_handler.\'
\';
$file_content = file(\'texts\'.$file_handler);
for($step = 0;$step
{
if(eregi($mytext,$file_content[$step])):
print "
Найдено в $file_handler Статье ";
endif;
}
endif;
}
?>