[ic] How can an external CGI script pass information to Interchangepages?

Hans-Joachim Leidinger jojo@buchonline.net
Thu, 26 Oct 2000 01:51:42 +0200


Khai Doan wrote:
> 
> Dear list,
> 
> I need to make a special page, so that if an external CGI script knows
> about the URL of this page (with session id embeded) can redirect a visitor
> (or user) to this page, and pass a long some information.  Have anyone
> tried something like this?
> 
> Thanks,
> 
> Khai Doan

Yes! IC can do this!

Short description and example:

1. Call the external cgi script

<FORM ACTION="<URL-to-the-script" METHOD="POST">
<INPUT TYPE=hidden NAME=mv_session_id VALUE="[data session id]">
<INPUT TYPE=hidden NAME=my-own-succes-URL-page VALUE="success">
<INPUT TYPE=hidden NAME=my-own-failure-URL-page VALUE="failure">

and all other some informations...
<input type="submit" Name=mv_todo VALUE="Call the external cgi script"> 
</FORM>

(
Make sure, you use the right variable names, which is knowing by the
external cgi script.
You can call the external cgi script without the form tag. But if the
user has cookies enabled, something can goes wrong.
If you need the right session, check the cookies capability first.
Search for "[read-cookie MV_SESSION_ID]" in the old MiniVend mail
archives.
)

2. Get the informations from the external cgi script
   
   1. Step: Get the informations via

  [perl arg="cgi scratch"]
  $Safe{'scratch'}->{"myvarname1"}  =
$Safe{'cgi'}->{"external-varname1"};
  $Safe{'scratch'}->{"myvarname2"}  =
$Safe{'cgi'}->{"external-varname2"};
   ...and so on
  "";
  [/perl]

  2. Step:
  You can get the informations via

  [scratch myvarname1]

  and so on.

I hope, you get the picture! 

Joachim

BTW:
You can go to the old MiniVend mail archives and search for "fetching
cgi query string".
  

-- 
-------------Hans-Joachim Leidinger---------------------