SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Search in PHP without MySql
-
Jun 13, 2007, 04:59 #1
- Join Date
- May 2007
- Posts
- 19
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Search in PHP without MySql
I am trying to do a search for my site but all the scripts/tutorials I found require mysql. Is there one way to make it with pure php? I don't care if it doesn't scan pages for strings, it could be for example like this: if you search for "tool" then echo a link on the page that navigates you to tool_gallery.html or something...
-
Jun 13, 2007, 05:24 #2
- Join Date
- Aug 2004
- Location
- Manchester UK
- Posts
- 13,807
- Mentioned
- 158 Post(s)
- Tagged
- 3 Thread(s)
Certainly possible by using file() to open the files and eregi() to match the string to look for.
If you are searching entire directories use glob() to open the directory and a recursive function to read through them
How have you got you articles set up?Mike Swiffin - Community Team Advisor
Only a woman can read between the lines of a one word answer.....
-
Jun 13, 2007, 10:29 #3
- Join Date
- Jul 2003
- Location
- Kent
- Posts
- 1,921
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
I visit a site that uses this
http://www.kscripts.com/scripts.shtml
Okay, it's Perl, but if you want the search done, it does seem to work well.Dr John
www.kidneydialysis.org.uk
Bookmarks