Hi all,
I can get the url no prob, but I'm having trouble extracting what i would like:
$url = "http://somesite.com";
$firstArray = array ("apple", "banana", "new pears", "spicy something");
$secondArray = array ("blue", "green", "bright yellow", "another color with spaces");
$fp = fopen("$url", "r");
$contents = fread($fp, 100000);
fclose($fp);
$line = explode("\n", $contents );
$linecnt = count($line);
for ($cnt=0; $cnt < $linecnt;$cnt++) {
if (eregi(array($firstArray,$line[$cnt]))) { //NOT SURE HERE?
$finalArray1[] = $line[$cnt];
}
if (eregi(array($secondArray,$line[$cnt]))) {
$finalArray2[] = $line[$cnt];
}
}
this isn't working, but not sure how to accomplish loading the 2 different arrays with the content wanted in $firstArray & $secondArray, (& yes, I need to have some items in those arrays contain a space)?
thanks...