Executing a cgi in the results

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Executing a cgi in the results

Post by Thunderstone »



We have banner ads displayed through a cgi on our site.

Unfortunately, our web server won't allow server-side-includes to be run
through CGIs.

I was wondering if there was any way to get the script to run the cgi and
return the output (which is html) on the search results page.

Thanks,


-------------------------------------------------------------------------
| Brock Rozen | brozen@webdreams.com | http://www.webdreams.com/~brozen |
-------------------------------------------------------------------------




User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Executing a cgi in the results

Post by Thunderstone »





You can <EXEC> the ad script from the Vortex search script, but it
will run in a normal, not CGI, environment, so it may not work properly
unless the ad script knows this or its output is parsed by the search
script. (See http://www.thunderstone.com/vortexman/node32.html for more
on <EXEC>.)

A better solution would be to generate the ads with the Vortex search
script itself if possible, to save the overhead of running yet another
CGI program. Perhaps a <randpick> from a variable list of possible ads.


-Kai


Kai Getrost | Thunderstone Software - EPI, Inc.
kai@thunderstone.com | info@thunderstone.com





User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Executing a cgi in the results

Post by Thunderstone »



On Tue, 19 Aug 1997, Kai Getrost wrote:


Well, I tried this yesterday before posting the question, and it doesn't
return anything. Any ideas?

<exec NOBR /torah/httpd_torah/cgi/torah/banner/display1.cgi> </EXEC>
<spew $ret>

When run directly, the program will return something like this, which
leads me to believe it doesn't need the CGI environment.

Content-type: text/html

<ad>
<center>
<font size=-1>
<a href="http://www.torah.org/cgi-bin/torah/bann ... tp://www.t
target="_top"><font size=+1>Image reading2.jpg</font></a><br>
<a href="http://www.torah.org/cgi-bin/torah/bann ... tp://www.t
target="_top">If Yes, Click Here!</a><br>
</font>
</center>
</ad>





Not in this case, unfortunately. Our banner program keeps statistics and
we'd still like that available.

-------------------------------------------------------------------------
| Brock Rozen | brozen@webdreams.com | http://www.webdreams.com/~brozen |
-------------------------------------------------------------------------




User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Executing a cgi in the results

Post by Thunderstone »

User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Executing a cgi in the results

Post by Thunderstone »



On Tue, 19 Aug 1997, Kai Getrost wrote:


With <sandr> it all works perfectly now.

Thanks for all your help -- your suggestion did it.


-------------------------------------------------------------------------
| Brock Rozen | brozen@webdreams.com | http://www.webdreams.com/~brozen |
-------------------------------------------------------------------------




Post Reply