Solved

cgi programming in Visual Basic

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

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 …
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
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)

830 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