View Full Version : site search that searches database entries...
sjbeatle
10-23-06, 12:03 PM
Hi,
I'm looking for any good info someone may have on how to incorporate a site search into a website.
What am I looking to accomplish?
Well, the site contains articles that are stored in a database. I would like users to search through the articles for keywords, using a search form, and then have the results displayed.
Basically, I want exactly what powweb does here in the forums with their search capabilities. Although, I don't need the advanced option, just the basic type the word(s) and click search.
Does anyone know of any great scripts, or can at least maybe point me in the right direction? Does anyone know the miracle behind the search capabilities here on the forums?
Thanks in advance for your help!
~steve
BerksWebGuy
10-23-06, 12:57 PM
A little home-grown version of searching through a DB and pulling out articles that have a certain word in it...wouldn't be too hard if you have some experience with PHP.
If you have no experience...this is a good time to learn or check out www.HotScripts.com .
I've been very happy with Sphider (http://www.cs.ioc.ee/~ando/sphider/).
It was very easy to implement. One down-side is that it does not work with password protected pages.
sjbeatle
10-24-06, 10:56 PM
Try mine. If you like it (take a look at the advanced features) just follow the links in the SERP to use it on your own site. It's free. They also offer other free services like polls.
Or try Google's new, free, customized Co-op Search Engine and line it with money making Adsence Thanks keyplyr, but I wasn't able to try yours. I'm not sure what SERP is (i'm probably dumb for not knowing), and I couldn't figure how to just stumble upon it. Also, I looked a little into google's and couldn't really see any option to search a database... Thanks anyway though.
I've been very happy with Sphider .
It was very easy to implement. One down-side is that it does not work with password protected pages. And thanks to you, glwm. Sphider does seem like it'd be easy to implement. But, it seems to do a bit more than I care for it to do. There are many files associated with it, plus there's an administration page for it, and it requires extra tables in a database. I'm really looking for something basic . . . . which leads me to...
A little home-grown version of searching through a DB and pulling out articles that have a certain word in it...wouldn't be too hard if you have some experience with PHP.
If you have no experience...this is a good time to learn or check out www.HotScripts.com . I do have plenty of experience with PHP, and don't think I should have any problem creating a little home-grown version of searching through a DB. I just figured, rather than using up time trial-and-erroring my way through approaching this, maybe someone could point me in the right direction to a tutorial of sorts or something.
Your post really excited me. I want you to elaborate if possible. It seems as though you wanted to be sure that I could handle PHP before elaborating. Feel free to lay it on me. I can handle it!:)
Thanks to everyone, though!
steve
sjbeatle
10-25-06, 09:37 AM
Why couldn't you try my search? SERP is an acronym for Search Engine Results Page, and what I was suggesting was for you to do a search, and from the results page, follow the links at the bottom that take you to Master.com, the host for the search service - very easy.
As far as the Google resource linked above, you build your database right at the Google pages - very easy. It will search your site or any site you want it to for that matter. I also suggested you can sign-up for Adsence and make money from click-throughs from the Google SERP.
Let me know if you still have questions.
Sorry, keyplyr. When I said I couldn't try yours, I didn't mean that it wouldn't let me search, I meant I couldn't try using the code that runs it. This was due to my not knowing the acronym, SERP. Kinda silly in retrospect, but I seriously looked all over your homepage for some type of link dealing with SERP and couldn't find one :o . Now, I know why. Thanks for the clarification. Unfortunately, I know this may sound a bit pompous of me, but I don't want to sign up for a master.com account. And as for Google, it does sound enticing, and I may eventually use it for my own site, but this is for a site that I'm building for a not very big client at all, and I'd much rather learn to build from some type of tutorial, and know the code that's driving the search, rather than having google cookie cut it for me.
I really do appreciate your time, and will definitely take your suggestions into consideration in the future.:D
BerksWebGuy
10-25-06, 10:19 AM
If you want to create your own simple DB search. Get the searched word, query the DB, and echo out links to those articles. The hard part would be creating the links to the related articles. You would almost need a field in the DB that would have the name or location of the article...so you could create the link.
For a start...look here http://www.hotscripts.com/PHP/Tips_and_Tutorials/Searching/index.html
sjbeatle
10-25-06, 12:43 PM
Hello everyone,
Thanks so much for all of your help. What I've decided to use as a springboard can be found here: http://arutha.co.uk/viewtut/86/
It's very basic, and is exactly what I'm looking for.
You were all very helpful! :D
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.