Reproduction of ML message sent today by me:
HTTP Gambas Server Class v0.0.15
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 transportable.
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
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