Results 1 to 4 of 4

Thread: Extractable info - API for CGI version

  1. #1
    Join Date
    Dec 2004
    Posts
    617

    Default Extractable info - API for CGI version

    Hi there

    Would it be possible to add extractable information to the cgi script such as extractable number of results etc. Sort of like a google api.

    It can be done with php and asp but because the cgi is a binary excecutable, its much more difficult.

    I want to be able to see e.g. how many results a query would give and then write a program based upon that.

    Thank you

  2. #2
    Join Date
    Dec 2004
    Location
    Sydney
    Posts
    4,156

    Default

    You can certainlly call the CGI from another application and get results from back it.

    This is exactly what we have done for a demo product called the "CGI Front end". See here,
    http://www.wrensoft.com/zoom/support/cgifrontend.html

    On the page above you will find a short descritpion of how it was done and the source code for the example.

    The output from the CGI script is XHTML however. So you would need to parse this in order to get the information you wanted and ignore the rest of the XHTML.

    --------
    David

  3. #3
    Join Date
    Dec 2004
    Posts
    617

    Default

    If I was to say write some code in php which would send the query string to search.cgi, how would i go about telling search.cgi not to post the results to search_template.htm but to my script

    thank you

  4. #4
    Join Date
    Dec 2004
    Location
    Sydney
    Posts
    4,156

    Default

    > how would i go about telling search.cgi not to post
    > the results to search_template.htm but to my script

    Zoom doesn't post results.

    To embed search.cgi within a PHP file, use the following code (replacing the path to the search.cgi as appropriate):

    <?php
    $QSTRING = $_SERVER['QUERY_STRING'];
    while (list ($header, $value) = each ($HTTP_GET_VARS))
    {
    $QSTRING = $QSTRING.'&'.$header.'='.$value;
    }
    virtual("/cgi-bin/search.cgi".'?'.$QSTRING);
    ?>

    There are some additional details here,
    http://www.wrensoft.com/zoom/support...i.html#ssi_cgi

    ------
    David

Similar Threads

  1. Waiting for the license info
    By zamolxis in forum Zoom Search Engine V4 (Old Version)
    Replies: 1
    Last Post: 07-02-2006, 10:17 PM
  2. Wrong Info is displayed
    By TDM in forum Zoom Search Engine V4 (Old Version)
    Replies: 5
    Last Post: 10-19-2005, 08:32 PM
  3. Searching Database Info
    By VictorZ in forum Zoom Search Engine V4 (Old Version)
    Replies: 4
    Last Post: 06-29-2005, 06:40 AM
  4. A search finds the info but says it is in another category!
    By tadeusz in forum Zoom Search Engine V4 (Old Version)
    Replies: 2
    Last Post: 06-13-2005, 10:30 AM
  5. Mac version, or non-restrictive Javascript version?
    By iantresman in forum Zoom Search Engine V4 (Old Version)
    Replies: 3
    Last Post: 06-09-2005, 11:02 PM

Posting Permissions

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