I finally managed to make my files easily indexable by the se script which i installed.....but the script i choose seems to be not good enough

i have one dir with 300+ .php files with txt data, which should be all indexed and searchable by any word

ok i indexed it, but the script simply seems to not index all words in the files

for example, when i search for a word, it does not show all files where it exist
also i get a random word from a file and do a search for it, and it does not find it at all....

i need a script which can index these 300+ files (70mb+)
and i can do searches for any word and get all documents with it.....

if someone recommend me such script this will save me a lot of time
i already tried few without any luck

    the solution to your problem is simple create a php script that loads variables for the entire english dictionary $and = "and"
    then explode each file so each word is put into an array which gets searched for words give me a while and i'll post a base of what to do :o

      Work from this it'll give you a head start

      <?php
      $absolute_path = "/files/";

      $dir = opendir($absolute_path);

      while ($file = readdir($dir))

      {

      if (($file != "..") && ($file != ".") && !strstr($file, '.txt'))

      {

      $filename = eregi_replace('.[a-z]+$','',$file);

      $list .= $absolute_path$file;
      }

      }

      $text = file_get_contents($list);
      $words1 = striptags($text);
      $words = eregi_replace('.[a-z]+$',$words1,$words);
      $word_array = explode(" ", $words);
      if (isset($_GET['searchword'])){
      array_search($searchword, $words);
      // add to list files with variable in
      }
      else {
      //no words inputted
      echo "error message here";
      }
      ?>

      all done in fifteen minutes but not checked and i have left you some parts to do they should be easily implemented such as returning the pages with the searched results in them

        Write a Reply...