php search engine
hello all, does anyone know of a good php search engine script that will search files on my server from there meta tag.
or any anything else.
Hm... interesting. I could write that now. But I'm not going to because it would be silly.
It takes a while to search through all of that.
1. Do a directory listing type search.
2. Store each .htm (etc) file you come across with file_get_contents();
3. Split at the meta tag.
4. Save the metas and filenames/paths in an array.
5. Use a foreach loop to run through the array, using strpos() to determine if the search string does exist*
(*this assumes a single word; you could do more complex looping if need be)
6. Save each match into a new array, including the filename/path.
7. Output the matches' filenames/paths.
But it would take a while.
The better idea is to do the same, but use a database to seed the webpage list (skipping to step 5).
Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum