Sure thing! The text file is the source code of a webpage. I clicked on "view" and then "Source" in Internet explorer to pull up text source and then saved it as a text. Of course it still contains HTML. If it helps to know, the terms that I am looking for ALL fall between ">" and "<" characters. (<a href=blabla>TERMIMSEARCHINGFOR</a>) I am using fopen and fpassthru in my php code, but when I run it, the webpage shows up instead of doing what I want. I have included the php here for reference.
//$text = strip_tags(">blue@email.unc.edu<>valerie@email.unc.edu");
$blue = fopen("f:\chapelhillreview.com\test.txt","r");
$text = fpassthru($blue);
$text1 = ereg_replace("<table>", ",", $text);
$text2 = ereg_replace(","," ",$text1);
$explode = explode(",", $text2);
$num = count ($explode);
for ($count = 0; $count < $num; $count++) {
if (ereg(".+@email.unc.edu$", $explode[$count], $arr)) {
echo("$arr[0]<br>");
}
}
This code shows im lost more than anything, but hope it helps. Thanks a lot foryour help.
blue