Results 1 to 8 of 8

Thread: How to search some words in the whole site file ?

  1. #1
    Join Date
    Jun 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to search some words in the whole site file ?

    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
    Last edited by ddadmin; 08-16-2012 at 11:16 PM.

  2. #2
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    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?
    To choose the lesser of two evils is still to choose evil. My personal site

  3. #3
    Join Date
    Jun 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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



    thanks

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by wtl-php View Post
    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



    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.
    Last edited by traq; 08-16-2012 at 09:54 PM.

  5. #5
    Join Date
    Jun 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  6. #6
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    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!

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    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.
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •