Results 1 to 5 of 5

Thread: How did they do that?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    NY, USA.
    Posts
    240

    Question

    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]
    Omar
    [email protected]
    http://omar.caribwalk.com
    To God Be The Glory

    I see Tech People ...

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    I think you need to create your own webserver for doing that.
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    NY, USA.
    Posts
    240

    Exclamation 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.
    Omar
    [email protected]
    http://omar.caribwalk.com
    To God Be The Glory

    I see Tech People ...

  4. #4
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    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
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  5. #5
    Guest
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width