AW: [Gambas-user] gambas + cgi

Matthias Laur matthias-laur at ...978...
Mon Jan 30 08:36:01 CET 2006


Hi Daniel,

that looks nice. I will try it soon. One little question: How can I decide
the variables? In php by name, but if I reed them together in Buf?

 

Regards,

Matthias

 

 

  _____  

Von: gambas-user-admin at lists.sourceforge.net
[mailto:gambas-user-admin at lists.sourceforge.net] Im Auftrag von Daniel
Campos
Gesendet: Montag, 30. Januar 2006 00:15
An: gambas-user at lists.sourceforge.net
Betreff: Re: [Gambas-user] gambas + cgi

 

It is easy, you can even write CGI's with Bash. The only language not able
to do it was VB until the .NET version, I think :-)

A quite simple example would be (in a console program, do not forget to
remove the gb.qt dependency:

PUBLIC SUB Main()

  PRINT "Content-type: text/html\n"
  PRINT "<html><body>Hello World!</body></html>"

END

If you need to determine what is the method (GET, POST...) just use the
environment variable: REQUEST_METHOD:

IF Application.Env["REQUEST_METHOD"]="POST" THEN ...

To get the data from the POST method just read the standard input, and parse
it:

DIM Buf AS STRING

DO UNTIL Eof()

   LINE INPUT Buf
   ...

LOOP

Regards,

D. Campos

2006/1/29, Matthias Laur <matthias-laur at ...978...>:

Hello,
is there a easy way to create cgi files with gambas? Few weeks ago, I've
read
that the new gambasdoc was designed with gambas. Can I handle the output of
the POST-Method with gambas?

Regards,
Matthias 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642>
&kid=103432&bid=230486&dat=121642 
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20060130/9f515464/attachment.html>


More information about the User mailing list