Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

passing parameters from a CGI to another CGI

Posted on 1998-10-21
3
Medium Priority
?
216 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
Strange earned 300 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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…
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).

719 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