Not useful anymore, sorry.
aborted search script
/*
include("../top.php");
$search=strtolower($word);
print("
Search Results for $search");
$urlsearch=str_replace(" ","+",$search);
$searchList=$search;
#$searchList=~s/[^\w-' ]//g;
$words=split(" ",$searchList);
$directory='/web';
$db = dba_open("index","r","gdbm");
$i=0;
while(list(,$word)=each($words)){
$files=dba_fetch($word,$db);
if(ereg("^#",$files)) $files="";
$file_arr=split("#",$files);
while(list(,$f)=each($file_arr)){
$combined[$f] = $combined[$f]+1;
}
}
dba_close($db);
if (count($combined) > 0) {
while(list(,$item)=each($combined)){
$title="$item: No Title";
$filename=$directory.$item;
if($f=fopen($filename,"r")){
$contents = fread($f,filesize($f));
fclose($f);
if(eregi("",$contents)){
$lowCont = strtolower($contents);
$first = strpos("",$lowCont)+7;
$last = strpos("",$lowCont);
$title = substr($contents,$first,$last-$first);
if(strlen($title)>32){
$last = strpos(" ",$title);
if($last>32) $last =32;
$title = substr($title,0,$last);
}
}else $title="Untitled";
$data=str_replace("web/","",$filename);
print("$title
\n");
print(" $data");
}
}
else {
print("No matching documents found.");
}
print("
");
include("../bot.php");
*/
?>