View Full Version : How to search some words in the whole site file ?
wtl-php
08-16-2012, 06:03 PM
hope you doing great :)
suppose i have one site and i want to search my entire site file for specific words .. how to do that ?
file execution php not txt
thanx:)
james438
08-16-2012, 08:54 PM
Are you talking about searching an html file, which also includes any javascript or css also located on the file? Or are you talking about searching your entire site for a set of words to see what page on your site includes the set of words searched for? Could you clarify what you are asking for just a little bit more?
wtl-php
08-16-2012, 09:21 PM
am talking about searching my entire site for a set of words to see what page on my site includes the set of words
for example "hello_world" suppose its inside file named google in dir name templates..
like this
http://store2.up-00.com/Aug12/ZbI51919.jpg
thanks
am talking about searching my entire site for a set of words to see what page on my site includes the set of words
for example "hello_world" suppose its inside file named google in dir name templates..
like this
http://store2.up-00.com/Aug12/ZbI51919.jpg
thanks
that image (showing a text input for a url) would seem to indicate you want to search any arbitrary site - is that the case, or do you want to search *only* one particular site (your own)?
if it's your own site (which is what you seemed to be describing in your OP), it would depend on how it is built - is it a collection of actual pages (i.e., .html files)? Are you using a CMS? Is your content stored in a database or in flat files? Does your site rely on server/clientside scripting (or iframes, etc.) to function normally?
The way you're phrasing the question leads me to believe that you don't have any idea what is involved in this task - all you know is that you "want a search box." That's okay - it's not obvious or simple - but If you can't answer all of those questions, you probably need to do some studying before tackling a "site search" project. (Or, hire someone to do it for you.)
p.s. please don't use odd fonts/formatting in your posts for no reason. it's distracting and only makes it harder to read.
wtl-php
08-16-2012, 10:22 PM
well .. my question doesn't mean that i got no idea what am talking about .. yes am beginner i studied php but they didn't teach me how to program or code script except simple script like upload am trying learn from my friends they are good but they won't help all the time may be you are right but at least i know some.
you could at least give me point
anyway i changed my mind it's not necessary :)
thanks a lot
No, but it does imply that you have only a vague idea of what's involved in this particular task. As I said, there's nothing wrong with that. We need to know where you're starting out from in order to give you the best advice. So far, your only attempt to explain in more detail was to restate your original request, and showing an example of what you want the form to look like, with no indication of any "behind-the-scenes" ideas.
If you don't already have an idea of how the programming will work - even if details are missing - then my most sincere advice is that this is not the best choice of projects to begin studying web programming.
I'm not ridiculing you - and my questions were pointers. Those are the sorts of things *anyone* will need to know before staring a project like this. For example, if your site content is stored in a database, you'll need to be searching the DB (and not the "pages" themselves). Likewise, if your site is plain html pages, you'll need to figure out how to search only the content, and not the markup/scripts/css/etc.. If your site uses iframes or javascript to pull in content from other sources, you'll need to plan for that - otherwise, such content would be "invisible" to your search.
If you already know all of this, then please post what code you have so far (or a code outline, or just ideas/specific questions), so we can help out with that. The more info, the better!
djr33
08-18-2012, 12:19 AM
If you have trouble working out the details and giving us enough information to give you more specific help, then I suggest looking into Google Custom Search or similar options. Much easier to do, works pretty well, and you won't need to figure out all of these things which are difficult if you haven't done it before. If not, it's time to take this on very seriously and figure out how everything works "behind-the-scenes" as traq said.
bernie1227
08-18-2012, 01:31 AM
An easy way to do this without having to do any coding, would be to use a google custom search bar on your site, just as dynamic drive does.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.