Code: Select all
<?php
$haystack = file_get_contents("logs2.txt");
$hayarray = explode("\n", $haystack);
$needle = file_get_contents("files2.txt");
$needarray = explode("\n", $needle);
foreach($hayarray as $arg){
foreach($needarray as $val){
if(strpos($arg, $val) !== false) {
echo "found: " . $val . "<br>";
break;
}
}
}
?>