dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language:
Expertise: Beginner
Apr 24, 2000

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Getting CGI Output

Question:
Using C or C++ for CGI programs, is there a way to make a CGI program that calls another CGI program, and then takes the output of that called CGI program, and displays (to the client only) some selected text from the output of the called CGI program? For example, A CGI program that can use the Yahoo CGI program to display to the user only the first search result of a Yahoo search.

Answer:
A CGI program is a process, and as such, it has a distinct address space. Therefore, you can't pass values directly from one CGI program to another unless you use some sort of interprocess communication (IPC), such as, sockets, shared memory or pipes. However, you can avoid the hassles of IPC by writing the results of the first CGI program into a file and then have its caller read the data from that file, filter it, and display it to the user.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date