Results 1 to 4 of 4

Thread: CGI Module questions

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    CGI Module questions

    Hello, I was wondering exactly how do I use the Gets/CGI_Read command to get arguments from ThinBasic when it's used as a web scripting language? I had tried to use this before to create a System Administration Panel for my computer so that I could tell it to shutdown and stuff like that when I put a argument into the address. Can anyone provide me with the information to do use the Gets/CGI_Read command to get arguments passed to the script from the address? ???

  2. #2

    Re: CGI Module questions

    Hi ShadowEO,

    what you mean with get arguments from ThinBasic, read a variable value (declared in the script) or retrive the parameters from script command line?
    With the CGI_Read function (Gets it's just an alias of CGI_Read) you read data from standard input that is normally whatever coming from GET or POST method.
    However now I can't but tomorrow I will see to supply you some example (at least I'll try).

    Regards,
    Roberto
    http://www.thinbasic.com

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

    Re: CGI Module questions

    See CGI_GetQueryValue function.
    This will read a variable from POST or GET method.

    [code=thinbasic]
    IF UCASE$(CGI_GetQueryValue("ShutDown", %CGI_REQUEST_METHOD_GET)) = "TRUE" THEN
    '---Do something
    END IF
    [/code]

    And your url can be something like:
    [code=dos]http://www.myweb.com/index.tbasicc?shutdown=true[/code]

    Till now very few asked about CGI module. Let me know if it works.
    What web server are you using? IIS version ?

    Thanks
    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

  4. #4

    Re: CGI Module questions

    Thank you very much, I forgot I posted here XDDD and I was using Abyss X1.

Similar Threads

  1. A few questions about the TBGL module
    By Bezumec in forum TBGL General
    Replies: 6
    Last Post: 22-06-2011, 10:43

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
  •