Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: thinBasic, like PHP?

  1. #11
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,129
    Rep Power
    732

    Re: thinBasic, like PHP?

    I have been experimenting with CGI about half an year ago, as I did some experiments regarding its use to automate psch.thinBasic.com.

    It worked well, as long as you use GET method of passing parameters.

    But when I used POST method, CGI_GetQueryValue("name", %CGI_REQUEST_METHOD_POST) did not return anything and Gets() entered the infinite loop on the server.

    In my opinion, ThinBASIC, with its string handling, is good candidate for solid PHP alternative, but it would require having person who could dedicate time to maintain the module. Ideally with previous long time CGI experience, which I am not.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  2. #12
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,794
    Rep Power
    10

    Re: thinBasic, like PHP?

    Personally I have no problem to publish CGI module as sources but I had no authorization from Roberto to release it to the public so maybe someone else can hand over it.
    Unfortunately he just gave to me the authorization to publish as compiled module.
    CGI is 100% Roberto module code so I need his OK.

    Sorry.
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #13

    Re: thinBasic, like PHP?

    While you're waiting for thinBASIC to support CGI, ScrptBasic is a easy way to write CGI scripts. You can use scriba (command line interpreter) or use the ScriptBasic HTTP multithreaded application server. (standalone or as a proxy to Apache) It could be a great way to learn CGI programming without all the work.

    Here is an example of using scriba for a Hello World CGI program.

    #! /usr/bin/scriba -c
    
    INCLUDE cgi.bas
    
    OPTION cgi$Method cgi::Get
    
    cgi::Header(200, "text/html")
    cgi::FinishHeader()
    
    a = "Hello World !"
    
    PRINT """
    <html>
    <header>
    <title>ScriptBasic CGI</title>
    </header>
    <body>
    <center>
    """
    
    PRINT "<h1>" & a & "</h1>\n"
    
    PRINT """
    </center>
    </body>
    </html>
    """
    
    END
    
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

Page 2 of 2 FirstFirst 12

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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