Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using QB4.5 for CGI under POST method

Status
Not open for further replies.

robherc

Programmer
Apr 20, 1999
921
0
0
US
&nbsp;&nbsp;&nbsp;&nbsp;Hello; I have now gotten familiar enough with QB4.5 that I am wanting to start compiling some web-friendly applications as I have found QB4.5 to be quite powerful AND easy to work with for tasks such as are encountered in CGI useage. My only problem, however, is that I have *no idea* how to access parameters passed to a QB4.5 executable through a POST method form submission.<br>
&nbsp;&nbsp;&nbsp;&nbsp;ANY help would be _GREATLY_ appreciated!<br>
<br>
<br>
-Robherc<br>
robherc@netzero.net
 
Which parameters? and how do you want to pass them?<br>
QB45 is a very good way to get around Winblows and get to the root of the matter. But QB45 and Winblows don't talk to each other (which is good and might be unfortunate). Why did Micro$~1 discontinue support for QB45? Winblows hooks every interrupt known to man **BUT** some poor programming sap at MS decided to leave the back door unlocked....<br>
<br>
Have IRQ, will travel. But not far.<br>

 
&nbsp;&nbsp;&nbsp;&nbsp;The parameters are input to be logged into a RND file & compared to info from records already contained therein......they are being passed to the app (are *going* to be passed to the app actually) through a form with this (approximate) opening tag:<br>
&lt;form name=form0 action=/loginout.exe method=post&gt;<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Later I will want to also be able to program a QB4.5 app to control uploading & execution of files through a similar form.....the first app is just a simple one to work out the glitches.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Should I try using COMMAND$ to see if anything turns up there from a POST operation (*very* doubtful that it'll work though...that would work with GET method forms; but POST method are different/can pass more information.<br>
<br>
<br>
-Robherc
 
As in the case of two deaf-mutes, unable to "sign" to each other, the easiest way to pass data between apps (without knowing the nitty-gritty, low-level details) is to leave notes. With Windows apps its easy to clear the clipboard, post a message there and hope the other app picks it up before yet another app (or the user) overwrites the information. With DOS apps running under Windows, I believe you can post a message in the master environment table and pick it up with an app in a different window (I haven't tried it yet. Mike Lacey could probably resolve the question of whether Windows maintains separate master environments for each window or just uses local environments).<br>
The big problem comes when you try to interface Windows and DOS. DOS apps have a hard time reading the clipboard and Windows apps pay little attention to the DOS environment.<br>
There is probably only one sure way to allow DOS and Windows apps to interact; leave notes on a hard drive.<br>
Allow the apps to post instructions to each other.... read once and delete (or over-write).<br>
<br>
I hope I haven't sent you in the wrong direction. I have a pretty good grasp of QB45's abilities and limitations but have a profound ignorance of the methods you plan to use on the other end.<br>
<br>
Good luck. You may be trying to set a nail with a screwdriver; it CAN be done... but you might find an easier way.<br>

 
I guess I'm off to see the Perl Monger (wizard) because what I'm wanting to do is to pass info to my CGI program remotely, w/o allowing access to the clipboard, master environment, or HDD....oh well, was worth a try ;-)<br>
<br>
<br>
-robherc<br>
robherc@netzero.net
 
Wait a minute! I haven't been keeping up with postings. There is a simple way to pick up parameters from the web server which is exactly the same way that C programs get the parameters. Any time you are writing a CGI program all parms are passed as standard input and output from the web server to the CGI program. Neither the web server nor the operating system know or care what language the CGI is written in or what it does with the parms. All that is important is that the CGI returns control in a specified period of time or the server will consider it to be dead and return a default screen to the browser. In C standard input and output means the keyboard and screen. Same with QB45. Just do an INPUT or a LINE INPUT and all that CGI junk will appear in the input variable. The same thing for output. Just PRINT or WRITE to the screen and output will go to the browser. However the format is picky. You have to follow the MIME standards or the web server will just throw your output away. I spent about three weeks trying to make it all work sometime last year. I will dig up the source and send it to you attached to email. One of the biggest problems is working in the client/server environment since the webserver is usually on a different machine. I finally just had to run the web server on my own machine to make sure I caught errors and such. You might want to look into the Xitami web server since it takes up so much less memory and CPU time and costs zero (<A HREF=" TARGET="_new">
 
I found my source code. Its big. I can post parts of it or send it to you. My email address is:<br>
<A HREF="mailto:stevenu@usa.net">stevenu@usa.net</A><br>

 
Please send it to me (as a .zip archive prefferably)<br>
My e-mail address is in my .sig <p>-Robherc<br><a href=mailto:robherc@netzero.net>robherc@netzero.net</a><br><a href= > </a><br>*nix installation & program collector/reseller. Contact me if you think you've got one that I don't :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top