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.
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,
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.
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
> 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):
$QSTRING = $_SERVER['QUERY_STRING'];
while (list ($header, $value) = each ($HTTP_GET_VARS))
$QSTRING = $QSTRING.'&'.$header.'='.$value;
There are some additional details here,