Solved

passing parameters from a CGI to another CGI

Posted on 1998-10-21
3
211 Views
Last Modified: 2013-12-25
I have a third party CGI program which can be called using http://myWeb/aCgiProg?nameA=valueA&nameB=valueB.

Just wonder if is it possible to call the CGI program  "aCgiProg" from another CGI program ?  How can I pass parameters from one CGI program to another CGI program?
0
Comment
Question by:wosee
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
Strange earned 100 total points
ID: 1829236
You can use redirect for this.
Your CGI script doing something and then out to the stream
header with:

Status: 301 Moved Permanently
Location: http://site/other_cgi_script?some_params

0
 

Author Comment

by:wosee
ID: 1829237
I have tried to do this (written in C):

printf("Status: 301 Moved Permanently\n\n");
printf("Location: http://site/other_cgi_script?some_params");

Only the string "Location: http://site/other_cgi_script?some_params" printed out but didn't call "other_cgi_sctipt".  

WHY????
0
 
LVL 1

Expert Comment

by:Strange
ID: 1829238
Location - is the part of the HTTP header !
Try this:
main(){
printf ("Content-type: text/html\n");
printf ("Status: 302 Moved Temporarily\n");
printf ("Location: http://site/cgi-bin/printenv?uraaa\n\n");
}

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now