473,395 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
Jul 17 '05 #1
2 1886
"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
Jul 17 '05 #2
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
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Benny Alexander | last post by:
Hi, We are developing a CMS in ASP and before we write the code for a complete site search script and Forum, we want to check if is there any good ones? Kindly please let us know. Thanks in...
2
by: Dhanraj K.S | last post by:
Hi All, Is there any Site search application which is extremely powerful. It would be a great help if some one can suggest! Thanks in advance,
3
by: Carol | last post by:
What's the best way to do a site search of my site? I am using asp and access heavily on a regular ISP google? Or write a bunch of queries? what else is there?
1
by: D. Lee Christopher | last post by:
Can anyone point me to a good tutorial for creating a site-level search applet? I am trying to create a virtual catalog of sorts, and I would like to be able to search the catalog and have the...
4
by: Miguel Dias Moura | last post by:
Hello, I launched a web site some time ago and i am having problems in making it visible in the search engines. I used a lot of Keywords, not only in text but also in links, page and image...
2
by: Logan Noyes | last post by:
Can anyone recommend a good, reasonably priced software package for creating search functionality on an ASP.NET site? The site has about 1000 pages and the software package I seek would need to...
4
by: gwtc | last post by:
Here is a google search site bookmarklet. This lets you search a certain website using google. What I want is the same thing, but to search a certain geocities site. When you use the current...
71
by: Murray R. Van Luyn | last post by:
Hi, Since I have made changes to my website it's been a complete flop. According to the logs, as soon as visitors have downloaded the index page they are off. I can't figure out why? ...
3
by: CF FAN | last post by:
cf search using verity for my web site. I actually took the code from docs on teh web and tweeked a couple things out on it. Now it is throwing errors and I can't figure out why. What is funny is...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.