PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Results found line.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Results found line.

    What code would I use to display anywhere I choose on my site, the line "# results found." that appears at the top of search results. I would like to be able to display the total number of items current in the search engine anywhere.

    This line I want to post anywhere without the rest of the search results:

    5628 results found.

    The 5628 can be any number. Somehow I would use this ** in the code.

  • #2
    If you are implying that you wish to perform a "**" search automatically whenever someone visits certain pages of your site, and then retrieve the line "x results found" from the search results only for this purpose, then I should point out that this is very inefficient and unwise. A "**" (which is a search for all possible words in the dictionary) is a slow and exhaustive search. To perform such a search on other pages of your site would not be very practical.

    But with whatever method you go with, you will need to write some server-side scripting of your own, so I will presume that you are comfortable with PHP or ASP scripting.

    One easy way to do this would be to retrieve the "NumPages" value from the settings.php or settings.asp file.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      I tried to simplify my question as much as I could. What I want to do is exactly as I stated. I'm not suggesting anything. I just want to be able to display that ONE LINE anywhere on my website. I just want to state how many entries are in the ___.

      Comment


      • #4
        Yes, and the answer is the same. You will need to write some PHP or ASP scripting on your pages to retrieve the NumPages value from the settings.php or settings.asp file.

        For example, something like the following in PHP:

        Code:
        <?php
         
        include("settings.php");
         
        print("$NumPages pages available to search from.<br>");
         
        ?>
        Now, the path to the settings file will vary depending on where you put this code. And you would need to be careful if you are putting this in other scripts.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment

        Working...
        X