[thelist] php search within site

Bob Meetin ontheroad at frii.com
Thu Jan 18 16:44:01 CST 2007


I looked into a couple of the search applications about 3 months ago, 
some very easy to install, but the results were funky.  I don't remember 
which, but one of the problems I ran into - if I entered a phrase that 
was in one of the menus, it would return every page of the site. It was 
totally worthless.

On the www.caps-web.org site I decided to brew my own for this reason.  
The site is primarily (98% +) flat files to date. I wrote a PHP script 
to search the content of all the flat files (only), but excluding the 
navigational menu and a few other things that didn't need to be 
indexed.  It works well, in my opinion, doesn't have lots of bells and 
whistle, but works.  Whenever we add a new flat file all I need to do is 
add it to a file listing files to be searched.

Once we get into more dynamic data I'll add a module that will search 
the database files as well.  On my business site I have search functions 
built into specific page (php/mysql) such as my blog.  This is pretty 
easy to manage.

-Bob

super super wrote:
> Hi all,
>
> How does people write their own search engine for their sites?
>
> I used to create a database where the individual content of the pages are stored in the database records.  This seems not to be a really good way since its more troublesome.
>
> Is there any tutorial or discussion on the other website that talk about this?
>
> Thank you so much,
>
> Stanley
>   





More information about the thelist mailing list