Results 1 to 10 of 10

Thread: display search result on my site

  1. #1
    Join Date
    Jul 2011
    Posts
    21
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default display search result on my site

    please i need a script that can search just within my website and display result within my site. Plz i need it urgently if anyone can help i will appreciate. God bless in advance.

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

    Default

    This isn't easy. In fact, it's very difficult. That is, if you want to make it yourself or even install it for your site.
    A good option to avoid this is to embed google custom search or a similar service. It won't exactly be "in your site" but it can be embedded so that it works within your pages.
    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

  3. #3
    Join Date
    Jul 2011
    Posts
    21
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    i already did that but the client is insisting on displaying the result on his site....

  4. #4
    Join Date
    Jul 2011
    Posts
    21
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    please help, i tried seaching the net and no success yet, i saw a site where it is implimented and saved the page to look at the code, its looks like this :

    Code:
    <form method="post" action="search.php" id="searchform" style="padding-top: 35px;">
                <div style="float: right; margin-left: 10px;">
                    
                    <input value="Search" style="border: 2px double rgb(125, 125, 125); color: rgb(125, 125, 125); background-color: rgb(255, 255, 255); height: 23px; margin-top: 3px; text-align: center; font-weight: bold; font-family: helvetica; vertical-align: middle;" type="submit"> 
                </div>
                <div style="float: right; padding-top: 3px;">
                    <input name="list" size="30" maxlength="35" type="text">
                </div>
                </form>
    And the site i saw it is http://www.ngdelta.com , the code simply searches for a keyword within the site and publish its content in another page called search.php but i tried it on my site and its not working, please what have a done wrong?

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

    Default

    As I said, this is hard. Do you have any background in PHP or another serverside language? This isn't the sort of thing that you plug into your site and will work automatically. For one thing, you'll need to convert your entire site into some sort of searchable database, or (in theory) slowly search through every file on your site when someone does a search.
    Google is much easier, and you should just tell your client it's either that or much more expensive.
    I've written search engines for my sites, but they're not easy and they take experience with PHP, even just to set them up. But more importantly, the sites are designed for a system like that, not just plug-and-play with a normal website. They're based in databases to be automatically searchable.
    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

  6. #6
    Join Date
    Jul 2011
    Posts
    21
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    I stumbled upon a search service called site level and i had to use my site template to design the seach result page, so if you dont look the address bar you wont know you were taken outta my site, so that way he doesn't know. check it out @ www.piproxgroup.com use the search bar on the header section and see what i mean.

  7. #7
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,429
    Thanks
    104
    Thanked 117 Times in 115 Posts

    Default

    If that's what you want. It works on the same principle as the google custom search or similar search that djr33 mentioned in his first post to you. I wouldn't recommend it for one simple reason: It is inaccurate.

    Other reasons include:

    • It skips certain terms.
    • It uses text-indexing.
    • It indexes your site only when you choose to reindex it. There could be an auto index feature, but I could not find one.
    • The customizability is limited at best.
    • If sitesearch goes down then so does the program.
    • It works through spidering, so you need to specify the pages that there are no links to.
    • There are limits to how many pages it will index.
    • It has sponsored ads unless you want to pay to remove them.
    • Every time you add or modify content you will need to remember to reindex your site.

    Still, if you do not mind these little quirks, then it could be quite useful.

    The above were all big issues for me, so I took the time to design my own search program. This was a lot of work and remains the most difficult to write and complex program I have ever had to design. Partly this is true because I was starting with almost no knowledge of MySQL at the time, but even after all of the efforts I have made to simplify it it is still lengthy and the most complex.
    Last edited by james438; 08-20-2011 at 08:43 PM. Reason: modified last sentence
    To choose the lesser of two evils is still to choose evil. My personal site

  8. #8
    Join Date
    Jul 2011
    Posts
    21
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    So can you help me with any script even if i will have to modify it cos i am not that good @ php, i mean to that extent but i can do little things with it though.......lolz

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

    Default

    Searching is a useful feature, but it's difficult as we have said several times. If you want to pay someone to do this for you, that's an option. If not, then you will need to take your time and slowly look into what's required to build your own and work through it.
    If that sounds like too much, then using google custom search or a similar service is really your best option. They're not perfect (we're not claiming so), but it's better than nothing and much easier.

    The complexity of setting up your own search engine is for two reasons:
    1. You must design a search algorithm and deal with the actual searching, display, etc. This is the core and what you'd think of as the main part of a search program.
    2. You must design a website that can be searched. While this is not necessarily difficult, it requires rebuilding your entire website in a way that it can be searched.

    (1) is standard enough that you could find a "script" to install and use, potentially. (2) is custom for each site and unless you're following a specific tutorial when you first start, then it will require a lot of work to switch your site to this format.

    In fact, I did post some PHP/MySQL search query parsers that I wrote that do a good job at dealing with user input to a search field and locating the relevant results. But this is entirely dependent on having a MySQL database with all of your content in it so it can be searched. If you want to redesign your site to have all of the content stored in a MySQL database, then you could use this and I can give you a link to the discussion here.

    Attempting to search through files on your site (.htm, etc) will be very difficult. Google does this (and other services do as well), but this is also why Google is so popular-- it does it well. Honestly, there's very little chance you'd do it as well as Google (they have thousands of programmers who do this professionally), and even if you could then you wouldn't have their computing power. It's a LOT of work to run through all of the pages and search them. And in fact, they don't really do that. What they do is pre-process all of the pages on the site and they then build a database, then search it. In effect, it's like searching all of the pages, but much more efficient. If every query to your site's search were to run through the full text of all your .htm pages, that would be very inefficient and require a lot of computing power.


    There isn't an easy answer to this, so you should decide what is realistically the best solution for you at this point. Especially if you need this urgently, something like google custom search is really your only option.
    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

  10. The Following User Says Thank You to djr33 For This Useful Post:

    mavtrevor (08-20-2011)

  11. #10
    Join Date
    Jul 2011
    Posts
    21
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    I totally understand you, i will review my options here then and take the best and realistic one just as you've mentioned. thanks guys.

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
  •