Well, try this:
<?
$fd = fopen ("text.txt", "r"); //You open the file you to search in
$long=1000000; //You define the size of the string you want to get from thie file
//if you want the entire file, just set a value higher than the file's size
//the size is specified in octets :here i put about 1Mo(a little bit less actually
$stock = fread($fd,$long) ; //There you store the file in a string called $Stock
if (ereg("urgent",$stock,$table))
//With ereg("STRING_SEARCHED",$STRING_IN_WICH_YOU_SEARCH,$ARRAY_WHERE_YOU_STORE_THE_RESULT)
//this function returns false if it hasn't found the specified string.
//For symbols to help you describing the string you search, please see you manual
{
foreach ($table as $element) //for each element of the table
echo $element; //we display the result
}
else
echo "string not found"; //If the result hasn't been found you can display an error
?>
I hope i have been clear enough.