Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

cgi programming in Visual Basic

Posted on 1998-07-01
3
Medium Priority
?
191 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 60 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

916 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