iSearch PHP Site Search Engine - Installation

  1. Follow the quick installation instructions.
  2. To include a search form from another PHP page, include the following PHP code:
            /* Include the iSearch search form */
            /* Optional - set the width of the entry box in chars */
            $isearch_searchFormWidth = 12;
            /* Optional - set target frame for search results.
             * Default value is "_self".
            $isearch_resultFrame = "_blank";
            /* Optional - add a "Search Internet" button to be displayed.
             * Default value is True.
            $isearch_allowSearchInternet = True;
            define('IN_ISEARCH', true);

    Alter the include line to be a reference to the iSearch2 directory. e.g. if you are editing a file stored at, change the include line to:


    The variable $isearch_searchFormWidth can be used to set the size of the entry box. If it is not set it will default to 12 characters. If it is 12 characters or less, the "Search Site" button will be displayed below the entry field, otherwise it will be displayed to the right of it.

    The $isearch_resultFrame variable can be used to cause search to be displayed in an alternative frame.

    The $isearch_allowSearchInternet variable can be used to show a "Search Internet" button on the search form, allowing your visitors to perform internet searches also.

  3. To include a search form from an HTML page, you'll have to add the one of the following sections of HTML code to the page:

    For a small search box use the following:

        <!-- iSearch search form -->
        <FORM METHOD="post" ACTION="/isearch2/index.php">
          <TR ALIGN="center">
            <TD ALIGN="center"><INPUT MAXLENGTH="255" NAME="s" SIZE="40"></TD>
            <TD ALIGN="center"><INPUT TYPE="submit" VALUE="Search Site"></TD>
        <INPUT TYPE="hidden" NAME="action" VALUE="search">
        <!-- iSearch search form -->
        <FORM METHOD="post" ACTION="/isearch2/index.php">
          <TR><TD><INPUT maxLength="255" name="s" size="12"></TD></TR>
          <TR align="center"><TD><input type="submit" value="Search Site"></TD></TR>
        <input type="hidden" name="action" value="search">

    For a large search box, with a help button, use the following:

        <!-- iSearch search form -->
        <FORM METHOD="post" ACTION="/isearch2/index.php">
            <TD ALIGN="center">
              <INPUT maxLength="255" name="s" size="40">
              <input type="submit" value="Search Site">
              <input type="submit" name="internet" value="Search Internet">
              <A TARGET="_blank" HREF="/isearch2/help.php">Help</A></TD>
        <input type="hidden" name="action" value="search">

Installation Service

If the installation seems too daunting for you, I can install iSearch on your server for you. There is a small charge for this service to cover my time.

To see more information about the installation service, please click here.

Keeping your Search Index Up-to-date

It is important to regularly respider your site so that any changes are built into the search index. There are a number of ways to do this:

  1. Use the configuration interface "Spider" button, or nativagate to the "isearch2/admin/reindex.php" web page to regenerate the search index manually.
  2. Set a Unix "cron" job or Windows Scheduled Task on your server to run the spider engine. Use PHP from the command line as follows (replace "/www" with the full file path to your sites root directory):
    Unix    : /usr/bin/php -q /www/isearch2/admin/reindex.php cmd
    Windows : c:\php\php -q c:\www\isearch2\admin\reindex.php cmd
  3. Use the Auto Spider Engine to keep your site up-to-date.

The Auto Spider Engine

The Auto Spider allows you to keep your search index up to date automatically. It works by using page requests from visitors to your site to perform maintainance of the search index. This means that there is no reliance on manual spidering or cron jobs.

The Auto Spider is a PHP script that produces a 1 pixel transparent image. This means that it can be triggered by an embedded image in one (or more) of your web pages. Each time this image is displayed, a single web page will be spidered. Once the whole site has been spidered, the Auto Spider is disabled for a configurable length of time, then it starts again.

To install the Auto Spider, follow these steps:

  1. Choose a page on your web site that is visited roughly the twice the number of times each day as you have pages on your site. e.g. If you have 20 web pages on your site, choose a page that is visited about 40 times a day. If your site does not get many hits, you can choose multiple pages.
  2. Within the <BODY> section (i.e. between the "<BODY>" and "</BODY>" tags) of your chosen page(es), add the following HTML code:
    <IMG SRC="/isearch2/auto_spider_img.php" WIDTH="1" HEIGHT="1">

    Modify the "/isearch2" part to the directory into which you installed iSearch2.

This site is hosted by Z-Host. For low cost PHP web hosting visit Web hosting plans start at just $20 PER YEAR.

iSearch Home

Pro Version



Quick Install


Excluding Pages

Site Map




Toolbar Removal