SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    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...

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    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.....

  3. #3
    SitePoint Wizard
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •