[Gambas-user] gambas + cgi
Daniel Campos
dcamposf at ...626...
Mon Jan 30 00:14:33 CET 2006
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&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/be8f8d0e/attachment.html>
More information about the User
mailing list