Solved

cgi programming in Visual Basic

Posted on 1998-07-01
3
188 Views
Last Modified: 2013-12-25
I have got a PWS installed and have got the source code of CGI32.bas(This module initializes the CGI environment).But the problem is that Iam able to get a messagebox open through the remote PC but when it comes to sending back the HTML it gives an error saying HTTP headers not send.Iam using the PWS shipped with windows-95.Is it compatible for CGI?Another problem is that most probably the CGI data file which should have all the details of CGI to be executed is not being send as Iam not able to trap the command line arguments.Can you please help me out?If possible please suggest some books on CGI in VB.
0
Comment
Question by:zeus_akkali
[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 75

Accepted Solution

by:
Michel Plungjan earned 30 total points
ID: 1830338
What makes a cgi a cgi are the first lines of output...

Make sure you send the complete http header:

Send "Content-type: text/html" & Chr(10) & Chr(10)

with TWO linefeeds!
That are the all the http headers needed in a cgi
(unless your VB program writes other data than html - then the text/html would need to be changed to the mime type of the data you produce

Michel
0
 
LVL 6

Expert Comment

by:alamo
ID: 1830339
Michel, see http://www.experts-exchange.com/Q.10059469 for why that's not the real problem here. The real problem is that VB has no builtin method for writing to STDOUT or reading from STDIN.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1830340
Alamo: Thanks - So far all beginner problems to do with cgi in any programming language has had to do with the content type header... I saw this a another one of these.

What a pain - most programming langages can write cgis straight out of the box - can it be run from a commandline? Ok it can be run as a cgi ;-)

Michel
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to count occurrences of each item in an array.

617 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