Solved

passing parameters from a CGI to another CGI

Posted on 1998-10-21
3
210 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
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.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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

10 Experts available now in Live!

Get 1:1 Help Now