Solved

cgi programming in Visual Basic

Posted on 1998-07-01
3
187 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

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to count occurrences of each item in an array.
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…

752 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