-
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.
thanks
-peej
-
-
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.
You could:
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
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks