PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Search box that will access 3 different indexes

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

  • Search box that will access 3 different indexes

    Hi i'm looking to modify my current PHP search box so it can give result from 3 different indexes using 3 categories, right now it's 1 search box using 1 index.

    I want 1 search box looking into 3 indexes which have there own search.php under there own folders not 1 for each but 1 for the 3 of them.

    ex: http://my.website.com/albums/all/alb --> these will be under Album categorie with .php extension
    http://my.website.com/albums/all/mp3 --> these will be under MP3' categorie with .mp3 ext.
    http://my.website.com/albums/all/txt --> these will be under TXT categorie with .txt ext.

    all of the search.php will be at the root of each folders (http://my.website.com/albums/all/alb/search.php) etc...

    But i only have a very basic knowledge of PHP & HTML and like to change my current search to look in 3 different indexes:

    Here is my current PHP form:

    <form method="get" action="search.php" class="zoom_searchform">
    <input type="text" name="zoom_query" size="20" value="" class="zoom_searchbox" />
    <input type="submit" value="" style="border-style: none; background: url('images/find23.png') no-repeat; width: 23px; height: 23px;">
    <span class="zoom_results_per_page">
    <select name="zoom_per_page">
    <option>10</option>
    <option selected="selected">20</option>
    <option>40</option>
    <option>60</option>
    <option>80</option>
    <option>100</option>
    </select>
    </span>
    <span class="zoom_categories">
    <select name="zoom_cat[]">
    <option value="-1">All</option>
    <option value="0">Album</option>
    <option value="1">MP3's</option>
    <option value="2">TXT</option>
    </select>&nbsp;
    </span>
    <br />
    <span class="zoom_match">Match:
    <input type="radio" name="zoom_and" value="0" checked="checked" />any words
    <input type="radio" name="zoom_and" value="1" />all words
    <input type="hidden" name="zoom_sort" value="0" />
    <br />
    </span>
    </form>

    I may have a hard time to explain what i want here but i'm trying my best.

    Reason is i have a lot of php pages (over 3000) and about the same for TXT files and something like 65000 mp3's.

    I have the latest version of Zoom and it's the Professional version.

    Hope i'm clear enough!

    Thanks

  • #2
    Why wouldn't you just use the categories function in Zoom itself? You would just need to switch to the CGI output of the search script to allow > 65,000 files scanned.

    Comment


    • #3
      But i don't use CGI i'm using PHP i have my own server at home using WIN2003.

      I have no Idea what CGI is and how to configure this.

      I also use Spider mode to scan my files because the offline mode is only working for the intranet not the internet.

      I notice that i can't scan my mp3's in spider mode.

      Comment


      • #4
        You can crawl the MP3 directories if your MP3 directories are in the web path. If they are not in your web path you can create virtual directories in IIS or Apache.

        If you are using IIS or Apache you are already set up to use CGI. IIS has a folder called "Scripts" and Apache has a folde called cgi-bin. You would have output Zoom as a Windows CGI.

        What web server are you using?

        Comment


        • #5
          You didn't really explain why you think you need 3 sets of index files (and to do 3 searches, plus a merge, instead of doing a single search).

          What is the advantage of 3 sets of index file if you are always searching all of them for every search?

          If this is just for your home use, do you even need to use a web server. Maybe you can use the Zoom Front End.

          Yes, you can only use offline mode for files that are on your local hard drive(s), not for files on the internet.

          But you can use Spider mode to index MP3 files. You just need to make sure you have HTML links to your MP3 files for the spider to find them. (Offline mode will be quicker than spider mode however as your local hard disk will be faster than your network connection).

          There is a summary of what CGI is in the User Guide V5.1 (section 9, page 113, "What is CGI"). Needless to say there is also a lot of information on the web.

          But setting up CGI on W2003 can be tricky. It is easier on Apache.

          Comment


          • #6
            Thanks for the info.

            I use Badblue for a peer to peer but i thing i'll take the time and install apache and setup everything properly then go with one index.

            The reason i was thinking of 3 index was this way the indexes will be smaller then faster, so if i'm searching for mp3's i'll choose the mp3 categorie instead of "all" so i won't get everything but only what i'm looking for.

            I'll have to work on this because so far i'm getting to many "Connection Time Out" then i get "Invalid URL or domain name".

            Thanks for your help.

            By the way the info of my machine is Win2003, running Badblue as my Web with PHP and it's an Intel Core 2CPU 6400 @ 2.13Ghz, 3GB of RAM and got 2TB of hard disk.

            But i will work on Apache to be my Web server.

            Comment


            • #7
              Just do yourself a favor and install WAMP server. http://www.en.wampserver.com/

              This is a single executable that will install Apache, PHP, MySQL, with the modules you need. CGI, PHP, etc...all work straight out of the box.

              You will usually install to c:\wamp

              Your CGI script and index files would go in c:\wamp\Apache2\cgi-bin\ and your web files would go in c:\wamp\www\

              If the files you want to index are not going to be in the c:\wamp\..... path then you just need to set up an alias in the Apache httpd.conf file.

              For example.

              Alias /mp3 "c:/mp3/"

              <Directory "c:/mp3">
              AllowOverride None
              Options Indexes FollowSymLinks MultiViews
              Order allow,deny
              Allow from all
              </Directory>

              This means that anything in c:\mp3 will be available at http://mysite.com/mp3 and will enable you to crawl with Zoom

              Comment


              • #8
                Thanks MikeR

                Indeed it's better i installed it on my XP machine for testing and enabled the port on my router and with Apache installed the result is faster and i get result that i didn't before with PHP only (with some bigger request i was getting page cannot be displayed even if in my php.ini i changed the max memory to 400M) but with Apache now it faster and also get results.)

                Thanks again to you both i'll print that thread and use it for further reference.

                Comment


                • #9
                  Just keep in mind that WAMP server is not secure by nature, you need to manually lock it down. It's fine if its behind a firewall but if you want to access it from the internet you need to look for some tutorials on securing it.

                  Comment

                  Working...
                  X