Site Search

This is a discussion on Site Search within the PHP Language forums, part of the PHP Programming Forums category; I am making an In-Site Search for a website, it is a PHP page where user can enter the ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-18-2004
KC Wong
 
Posts: n/a
Default Site Search

I am making an In-Site Search for a website,
it is a PHP page where user can enter the keyword(s),
and then the page will read through all other html/php pages to find
that keyword(s).
My problem is how to avoid searching the tags?
For example, when user typed in "$PHPSELF", how to avoid searching the
code within <?php ?> tag? Also, how to avoid searching the attributes
in other tags?
Assume that the server doesn't have MYSQL installed, and no index file
is made.
Thanks!

And by the way, do you have better solutions to do the In-Site search
without using MYSQL?
Thanks!

KC
Reply With Quote
  #2 (permalink)  
Old 08-18-2004
steve
 
Posts: n/a
Default Re: Site Search

"KC Wong1" wrote:
> I am making an In-Site Search for a website,
> it is a PHP page where user can enter the keyword(s),
> and then the page will read through all other html/php pages to

find
> that keyword(s).
> My problem is how to avoid searching the tags?
> For example, when user typed in "$PHPSELF", how to avoid

searching the
> code within <?php ?> tag? Also, how to avoid searching the
> attributes
> in other tags?
> Assume that the server doesn’t have MYSQL installed, and no
> index file
> is made.
> Thanks!
>
> And by the way, do you have better solutions to do the In-Site

search
> without using MYSQL?
> Thanks!
>
> KC


KC, you are much better off simply putting in one of the many free
site search buttons. Google has one, and so do others. You are done
in 5 minutes vs. spending quite a few days, and never getting it to
work quite right. Just my 2 cents.

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-Site-Sea...ict140737.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=471682
Reply With Quote
  #3 (permalink)  
Old 10-06-2004
bruno modulix
 
Posts: n/a
Default Re: Site Search

KC Wong a écrit :
> I am making an In-Site Search for a website,
> it is a PHP page where user can enter the keyword(s),
> and then the page will read through all other html/php pages to find
> that keyword(s).
> My problem is how to avoid searching the tags?
> For example, when user typed in "$PHPSELF", how to avoid searching the
> code within <?php ?> tag? Also, how to avoid searching the attributes
> in other tags?
> Assume that the server doesn't have MYSQL installed, and no index file
> is made.
> Thanks!
>
> And by the way, do you have better solutions to do the In-Site search
> without using MYSQL?
> Thanks!


You've already got some good answers and advices...

Now, if you insist on reinventing the wheel and rolling your own search
engine, there's also some documentation on the subject - at least the
source code of some free full-text indexers. The standard solution is to
have an index with words as keys and lists of matchings pages as values,
which quite easily fits PHP's associative arrays. And it's quite easy
(and fast) to serialize a PHP array and write it in a file. This
probably wouldn't do if you plan to kick google out of business, but for
a single, medium size site, this is surely enough !-)

my 2 cents
Bruno
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:07 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0