Jump to content

Help and advice for a PHP search facility


barrycorrigan

Recommended Posts

Hi Everyone,

 

This site is always good for a bit of help and advice. I'm new to PHP and I am looking for some advice for the best way to get a PHP search on my client's website.

 

I know there are some software packages out there at the minute e.g.

 

http://www.sphider.eu/

http://www.wrensoft.com/zoom/index.html

 

Basically What should I do, Should I go with one of these (maybe you know a better piece of software). Are there any good tutorials out there to code my own.

 

Any Help would be great.

 

Regards

 

Barry

Search facilities are entirely dependant on the way your content is stored. Do you store page content in the database or is it hard coded into scripts?

 

A simple search function is easy to do with PHP if you're searching MySQL stored content, just use a LIKE query.

There's a few ways to do that then. One is to create a db table that stores page file names and keywords that relate to the content. You could even store the actual content for a more comprehensive search.

 

Other than that youll have to read the page files and look for the search term, you would need to exclude any php code whilst searching each page.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.