-
Hi,
what is technique that scripting languages such as PHP and Active Server Pages write directly to the web browser. I know that the differet web servers must support them in order for it to run properly.
Can VB create a scripting language that can read the contents of a file,script it, and then output(write) the result directly to the WEB Browser? If so, how?
I know that VB can sometimes be slow, but can this be done?
I hope that someone understand what i'm trying to say
[Edited by omarswan on 10-21-2000 at 03:49 AM]
-
I think you need to create your own webserver for doing that.
-
Thanks For your reply
Hi,
Thanks For your reply, but thst is not exactly what I want. All I need to know is how scripting languages such as PHP write directly to the browser. Also, can this be done using VB
I think that it has something similar to how Win CGI programs that are created using VB.
-
Yes, it is WinCGI and I've done it before with VB - point is that you must just include another module in your vb program and all the things (procedures) you do must write in module(s) - you just call apropriate procedures (constants) that are in included 3rd party module.
There is also activex DLL for that, but you have to pay for it (it has cookies and some other things that are not in module I used).
If you need further assistance, contact me via e-mail
-
Download this zip file:
http://pw1.netcom.com/~obrienk/files/cgi4vb.zip
and include the module "cgi4vb.bas" in your project. Set the startup object to "Sub Main()" in the project properties and create a sub called "Cgi_Main", That's where you place your code. It's fairly easy to use and I seem to remember the samples where quite helpful. :)
Remember though... the webserver hosting your program will need to be able to run executable files as cgi programs and you need to have the correct permissions for it to be executed too. Also... you should usually avoid giving your program any visual interface (inc message boxes and error messages...someone will have to go to the server and click OK and it'll sure annoy the web server's admin blokie...if that's not you :) ). Make your program as memory efficient as possible and ensure that it will never crash.
Doing server side magic like this is cool but ultimately inefficient unless it is really necessary.
An alternative is to use ASP...a Microsoft web server-side scripting language that uses vbscript or javascript...and c# in the near future too. The personal web server that you can install off the Win98 CD (or the second Visual Studio 6 CD...in the NT Option Pack) will run cgi programs and ASP.
Ok...enough essays for one day... email me if you want any help :)