L'ho scritta al volo, la devi testare:
Codice PHP:function cercaStringa($stringa_da_cercare) {
$file = "tuofile.txt";
$handle = fopen($file, "r");
while (!feof($handle)) {
$buffer = fgets($fd, 4096);
if (substr_count($stringa_da_cercare,$buffer)>0)) {
echo "Trovato-> [b]" . $buffer . "[/b]
";
}
}
fclose($handle);
}

Rispondi quotando