Make a cheap web server with simple no-CGI read write on port 80
jm.delorme at wanadoo.fr
Tue Feb 12 12:32:19 EST 2008
Hi from France!
The idea of this cheap html server came from "chat server" demo stack.
I tried, it works quite fine.
Next is a sum-up:
. accept connections on port 80 with message GotAConnection
on GotAConnection aSocket
. read from socket aSocket for 1 line
. analyze received line (GET or POST)
. read from socket aSocket with message GotNextLines
on GotNextLines aSocket , ReceivedLines
. Analyze ReceivedLines
. Do any processing you want with the user request
. Make TheHtmlAnswer from pre-made file + replaced text (wanted GET file ou
. write TheHtmlAnswer to socket
Any distant web browser then gets the requested .html files (as forms with
submit buttons), or POST anwsers after button clicks (submits) in previous
Is'nt life easy?
The only limit is that only html text is replied (no image) because no
Apache server is used.
Also have to record socket connections context in a gSocketConnectionsTable
because many connections are available (which .htm file must be sent back
Thank you for your feedback and own return on experience about making a web
server from Revolution.
View this message in context: http://www.nabble.com/Make-a-cheap-web-server-with-simple-no-CGI-read-write-on-port-80-tp15434481p15434481.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the Use-livecode