Solved

cgi programming in Visual Basic

Posted on 1998-07-01
3
183 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
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 30 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

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

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
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…

771 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