0

I had a website of 75 html pages Now I need to add a search into my index page. I wish to done it in PHP because my web server supports PHP. Please help me....

Thanks in Advance
Rajeesh

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by rajeesh_rsn
0

I would look into something like Google's Site Search.

Much easier than creating a script to search all those static pages.

But my client need a custom search by our own..... Please help me.....

0

Well, in that case, you would probably need to use the file system functions to find and load each file.
(Check out the glob() and file_get_contents() functions)

Once you have the files loaded, you would have to search through them using either the String Functions or a Regular Expression.
(See the substr_count() and preg_match_all() functions.)

Then you could simply print a list of files that contained a match for your keywords.
You could count the matches per file and display them based on that to get a more ordered list.

0

Well, in that case, you would probably need to use the file system functions to find and load each file.
(Check out the glob() and file_get_contents() functions)

Once you have the files loaded, you would have to search through them using either the String Functions or a Regular Expression.
(See the substr_count() and preg_match_all() functions.)

Then you could simply print a list of files that contained a match for your keywords.
You could count the matches per file and display them based on that to get a more ordered list.

Is any example or tutorial available.... Please help me....

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.