<?
$file = "http://www.example.com/phile.txt";
$fp = fopen( $file, "r" ) or die("couldn't open $file");
while ( ! feof( $fp )) { $text[] = fgets( $fp, 1024 ); }
reset($text);
fclose($fp);
foreach($text as $key => $value)
{
if (!strstr($value,'some text'))
{
$result.=$value;
}
}
?>
If it finds text: "some text" in the file, it wont add the line to variable $result.