Page 1 of 1
website content search
Posted: Mon Dec 04, 2006 7:53 am
by bskhas
Hi everyone,
i am currently developing a website for my client. he has requested a search feature that search the contents from the local website. Means the results return are from that particular local website.
For example if in the search box anyone types 'a', the search will be done from all the pages of the local site and results will be shown of each page that contain the character 'a'.
its really urgent, i will be kind enough if anyone can help me in this regard.
Thanks.
Posted: Mon Dec 04, 2006 8:52 am
by Corvin
Posted: Mon Dec 04, 2006 9:16 am
by ok
You mean that the search engine need to search in the web pages or in the local files?
If you intended to search in the local files, under linux you can use the "find" command.
Anyway, the functions Corvin has mentioned also can be used to do the same as find...
If you want to search the web pages, it depends how your site is built (DB, local files [a.html, b.html, c.php]).
thnx for the replies....
Posted: Tue Dec 05, 2006 2:27 am
by bskhas
OK n Corvin, both of you, thanx for your replies. I will look into the links that you sent for the help.
Yes i want to search the text from content of my local website pages.
Also just wanted to confirm that if any page is dynamic, suppose the search result page, will this technique helps to search the contents from dynamic pages?
Bundle of thnx for the help...
Re: thnx for the replies....
Posted: Tue Dec 05, 2006 4:35 am
by onion2k
bskhas wrote:Also just wanted to confirm that if any page is dynamic, suppose the search result page, will this technique helps to search the contents from dynamic pages?
Nope, Corvin's way won't work for dynamic content. Arguably it won't work for static content either unless you go crazy with some regular expressions and stuff.
Unfortunately the best advice isn't something you want to hear: Building a search system is not something you can quickly hack into a website. It's complicated, it needs planning, and it's not going to happen quickly. To be honest, if you've not thought about the search system from the very start of the site's development then it's not going to be very good.
You could just cheat though, and use Google ...
http://www.askdavetaylor.com/how_can_i_ ... _site.html