[ic] include ssi perl code

Joachim Leidinger interchange-users@interchange.redhat.com
Wed Feb 27 09:48:00 2002


Vutura - Internet Multimedia Werbung wrote:
> > Call it directly and send them the session id of interchange and make
> > sure, that script can call back a special interchange page and send them
> > the former session id back and show the result of that script!
> >
> 
> i don't know how to do that...
> the script and the output is on
> http://www.vutura.de/cgi-bin/hbpoll/xpoll.pl
> 

> > >   - it uses print instead of return
> >
> > And what is the problem? Change it to return! Store all the output like
> >
> > my $out = '';
> > ....
> > $out = "The first answer";
> > ...
> > $out .= "The second or xyz. answer...";
> > ...
> >
> > and send it with
> >
> > return $out;
> >
> 
> its a very big script an comlicated - i think it needs too much time to do so...

Write a little script, which is calling by IC and this new little script
call the poll script. Something like

my $query = new CGI::Request;
# the session id of interchange
my $sid = $query->param('sid'); 

$response = '/usr/bin/perl /your-path-to-the-script/xpoll.pl 2>&1';
print "Location:
http://www.yourdomain.com/cgi-bin/yourInterchangeCGI/the-back-page?id=$sid&respond=$respond\n\n";

Call that script from Interchange with &sid=[data session id] and in the
"the-back-page", you have

[seti respond][cgi respond][/seti]
[seti sid][cgi sid][/seti]

Test Output:<BR>
[scratch respond]
Back to Interchange with
http://www.yourdomain.com/cgi-bin/yourInterchangeCGI/thenextpage?id=[scratch
sid]

You get the picture?


> > If you have that script working well, why not calling that script
> > directly? If there are a problem with the right session id of IC, why
> > not send the session id of interchange to that polling script and get
> > back the right session id of that script or that polling script call the
> > special interchange page and send them the session id and the datas?
> >
> 
> i don't know how to do that exactly...

The the simple example above!
 
> the script is difficult
> i send it to u...

Why? I've not ask for that. Or do you want to pay my time?

Joachim

-- 
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[leidinger@bpanet.de] 
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de