Search
$search = trim($_POST['search']);
if($search)
{
$search = trim($_POST['search']);
$strSearch = strtolower($search);
print "
Search results for $search
";
$files = glob("/var/www/html/icami.in/*/*.php");
$count = 0;
for ($i=0; $i
") != 0)
{
$start=strpos($buffer,"title");
$end=strpos($buffer,"/title");
if ($start != false && $end != false)
{
$start += 6;
$sTitle= substr($buffer2, $start, ($end-$start-1));
}
else
$sTitle = $sFile;
if(@substr_count(@substr($buffer, 5, @strlen($buffer)-6), $strSearch) > 0)
$bFlag = true;
}
if (@substr_count($buffer, '");
if ($start != false && $end != false)
$body= substr($page, $start, $end);
$body = strip_tags($body);
$body = strtolower($body);
if (@substr_count($body, $strSearch) > 0)
$bFlag = true;
}
}
if ($bFlag == true)
{
$count ++;
//echo str_replace("home/icmai/public_html/","",$sFile);
$sFile =str_replace("/var/www/html/icami.in/","",$sFile);
?>
}
@fclose($handle);
}
if ($count == 0)
{
echo "No Record Found. Please try again with different keyword.
";
}
}
else
{
echo " Blank query
";
}
?>
$fnt= count($files);
echo " Total $count results found, from $fnt files.
";
?>