[ic] can I include another cgi script within [ic]?

Dan Browning interchange-users@lists.akopia.com
Mon Jul 23 23:18:01 2001


At 10:01 PM 7/23/2001 -0400, you wrote:
>On Mon, Jul 23, 2001 at 09:19:45PM -0400, Tim Watts wrote:
> > Hi All!
> >
> > I've serched the archives but with no simple answer, has anyone found a
> > simple solution to include cgi output from other scripts into a [ic] page?
> >
> > We are running a script for reviews of products.
> >
> > It does everything needed, but I would like to run portions of it within
> > interchange, namely to display the average ratings, then a link to the
> > reviews script to read them.
> >
> > How can I include this within [ic]?
> >
> > Is there a way to do something similar to a ssi call of the script?
>
>
>You need to untrap it or make it a GlobalSub
>
>[mysub]
>my $out=`/bin/date`;
>[/mysub]
>
>or you can make ic the ssi call depending on your server.
>That's usually harder because you're interleaving headers
>and output.
>
>Wouldn't it be easier to just suck the reviews out of a database
>as part of ic?
>
>That's three ways as fast as I can type.  :-)(

A fourth way would be to leave the <!--# --> SSI directives in there and 
let IC pass them to apache to parse.  But you probably need to run IC stuff 
on the output, in which case that doesn't help.

Dan Browning, Cyclone Computer Systems, danb@cyclonecomputers.com