[Gambas-user] http gambas serveur

Olivier Coquet ocoquet at 3d-phenomen.fr
Sun Jan 10 13:22:02 CET 2021

HTTP Gambas Server Class v0.0.15

Thank's Fabien,


I take the time to give you some information about my Gambas http server.

Originally, I wrote this class to make my home automation program 
accessible from a tablet or a smartphone.
Some researches had told me that to achieve this, I needed to install a 
web server, the php module and some other stuff. I also had to configure 
all this to work together. Last but not least, all these installations 
were dependent on linux distribution and therefore not very easily 
So I decided to write something simple, easily transportable and above 
all not dependent on anything but Gambas itself.
That's how this http server class was born.
The first versions only accepted browser connections and sent a pure 
html page, but as time went by and needs changed, I enriched it with 
more advanced features: get requests, *.gbp pages equivalent to php etc.
Today, the class can answer GET and POST requests, redirect pages, call 
a procedure in the main program when a *.gbp page is requested, manage 
encrypted logins and passwords, manage, through cookies, the validity of 
a session, etc....
Due to its relatively simple principle, any program can become a 
"communicating web" by just copying and pasting the class, creating a 
processing procedure in the main program and instantiating the class.
I've added some examples in the web-docs folder in which I demonstrate 
the verification of a login and password, the verification of the 
validity of a session if the page is protected, the sending and 
processing of information entered in a form, etc....

Do not hesitate to ask me if you are interested in additional functions.

For your information, this class is the first one I am writing, 25 days 
ago I had no idea how classes work, a demonstration of how simple Gambas 
Basic is.
Maybe the next step will be to transform all this into a component if I 
can do it and understand how to build a component....
Friendship to all
Olivier Coquet.

PS: excuse me for English, i'm French and as all French peoples, I speak 
English "like a Spanish caw", this page is a translation made with deepl :)

Translated with www.DeepL.com/Translator (free version)

Le 10/01/2021 à 09:37, Fabien Bodard a écrit :
> Ok I've tested ... It seem really interesting :-). But unfortunately
> I've not the required competences to make more advanced judgement :-).
> More over I think I will use it for my own projects :-D
> Le sam. 9 janv. 2021 à 13:14, ocoquet <ocoquet at 3d-phenomen.fr> a écrit :
>> Hi all,
>> I've posted complet class of http server, if somebody can test it, it will be realy interesting for me to have your opinion ..
>> Regards
>> Olivier coquet.
>> Envoyé depuis mon appareil Galaxy
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----

More information about the User mailing list